PATCH {clientId}/CustomField/Numeric/{Id}

This method allows you to update a single Numeric Custom Field specified by the Id parameter.

Request Information

The HTTP PATCH request method applies partial modifications to a resource. Click here to learn about using PATCH.

The MyPreferences API supports add, replace, remove, and test PATCH operations. The API does not support move and copy PATCH operations.

In the JSON body of your request, send the op, path, and value parameters.

  • op denotes the type of operation to execute such as add, replace, remove or test
  • path denotes the path of the target location on the resource to update
  • value denotes the value to apply.

Note: When removing multiple elements from an array object, send the remove operations in descending order to keep the indices intact.

URI Parameters

NameDescriptionTypeAdditional information
clientId

This is your organization’s MyPreferences Account Id.

string

Required

Id

Id of the Custom field to update

integer

Required

Body Parameters

NameDescriptionTypeAdditional information
Operations

A collection of PATCH operations that you want to perform on the object.

Collection of OperationOfCustomFieldNumeric

Request Formats

application/json, text/json, application/json-patch+json

Sample:
[
  {
    "path": "sample string 2",
    "op": "sample string 3"
  },
  {
    "path": "sample string 2",
    "op": "sample string 3"
  }
]

application/xml, text/xml

Sample:
<JsonPatchDocumentOfCustomFieldNumeric5B0F46o8 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNetCore.JsonPatch">
  <ContractResolver i:nil="true" />
</JsonPatchDocumentOfCustomFieldNumeric5B0F46o8>

Response Information

Response Codes

HTTP Status CodeTextDescription
200 OK The request was successfully processed.
400 Bad Request The request was invalid and cannot be processed. This may be a result of a malformed request. You must update the request before trying again.
401 Unauthorized Authentication credentials are missing or incorrect. You must verify your ClientId, UserId, and Authorization Scheme before trying again.
403 Forbidden The authentication credentials were insufficient to grant access to the requested resource. In most cases, your user may not have the appropriate permissions to access the requested resource. Verify User Group permissions for your user before trying again.
500 Internal Server Error The server encountered an unexpected condition that prevented it from fulfilling the request. Notify PossibleNOW Support if it’s a continuous occurrence.

Resource Description

CustomFieldNumeric
NameDescriptionTypeAdditional information
Id

Id of the field.

integer

Read-Only

Edited

Read-only system fields returned as part of an API response. These are updated automatically when a profile is created or modified.

EditInfo

Read-Only

MinValue

Minimum value supported by the field.

decimal number
MaxValue

Maximum value supported by the field.

decimal number
DecimalPlaces

The maximum number of decimal places allowed by the field.

integer
DefaultValue

The default value of the field

decimal number
FieldMask

Stores the field's input mask definition. It will be used to drive data collection on a UI

string

Max length: 4000

Name

The name of the field

string

Required

Max length: 94

Min length: 1

LocalizedDisplayNames

Localized display names of the field

Collection of LocalizedDisplayName

Required

Description

The description of the field

string

Max length: 256

UpdateRuleId

Id associated with the update rule

UpdateRules
DisplayOrder

Determines the display order of the field when driving preference collection touchpoints

integer
IsReadOnly

Determines whether the field is ReadOnly or not. This property can be set via a POST when creating a Custom Field. Its value can be changed via PATCH.

boolean

This property is designed to assist API users to enforce read-only behavior on custom field values when driving preference collection touchpoints. The MyPreferences API does not validate against this property when updating custom field values on a profile

IsRequired

Determines whether the field is required or not

boolean
IsActive

Indicates the status of the field

boolean

Response Formats

application/json, text/json, application/json-patch+json

Sample:
{
  "Id": 1,
  "Edited": {
    "CreateDate": "sample string 1",
    "CreatedBy": "sample string 2",
    "ModifiedDate": "sample string 3",
    "ModifiedBy": "sample string 4"
  },
  "MinValue": 2.1,
  "MaxValue": 3.1,
  "DecimalPlaces": 4,
  "DefaultValue": 1.1,
  "FieldMask": "sample string 5",
  "Name": "sample string 6",
  "LocalizedDisplayNames": [
    {
      "Locale": "sample string 1",
      "DisplayName": "sample string 2"
    },
    {
      "Locale": "sample string 1",
      "DisplayName": "sample string 2"
    }
  ],
  "Description": "sample string 7",
  "UpdateRuleId": 1,
  "DisplayOrder": 8,
  "IsReadOnly": true,
  "IsRequired": true,
  "IsActive": true
}

application/xml, text/xml

Sample:
<CustomFieldNumeric xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ProfileServices.REST.Models">
  <Description>sample string 7</Description>
  <DisplayOrder>8</DisplayOrder>
  <IsActive>true</IsActive>
  <IsReadOnly>true</IsReadOnly>
  <IsRequired>true</IsRequired>
  <LocalizedDisplayNames>
    <LocalizedDisplayName>
      <DisplayName>sample string 2</DisplayName>
      <Locale>sample string 1</Locale>
    </LocalizedDisplayName>
    <LocalizedDisplayName>
      <DisplayName>sample string 2</DisplayName>
      <Locale>sample string 1</Locale>
    </LocalizedDisplayName>
  </LocalizedDisplayNames>
  <Name>sample string 6</Name>
  <UpdateRuleId>Always</UpdateRuleId>
  <DecimalPlaces>4</DecimalPlaces>
  <DefaultValue>1.1</DefaultValue>
  <FieldMask>sample string 5</FieldMask>
  <MaxValue>3.1</MaxValue>
  <MinValue>2.1</MinValue>
  <Edited>
    <CreateDate>sample string 1</CreateDate>
    <CreatedBy>sample string 2</CreatedBy>
    <ModifiedBy>sample string 4</ModifiedBy>
    <ModifiedDate>sample string 3</ModifiedDate>
  </Edited>
  <Id>1</Id>
</CustomFieldNumeric>