Updating Associate Custom Fields with API
You can update the dbo.CRM_CustomFields table via API using the PATCH
Update Customer By Parameter endpoint. This endpoint updates the customer information you pass in. You can use the AssociateCustom
parameter available to update the Associate Custom Fields.
Request URL:
https://dsapi.directscale.com/v1/customers/{customerId}
Example Request
Request Header:
PATCH https://dsapi.directscale.com/v1/customers/{customerId} HTTP/1.1
Host: dsapi.directscale.com
Content-Type: application/json
Ocp-Apim-Subscription-Key: ••••••••••••••••••••••••••••••••
Ocp-Apim-Trace: true
- Replace
{customerId}
with the Associate ID of the Associate you want to update. You can find the Associate's Associate ID on the Associate's Detail page (referred to as DirectScale ID here). - Replace the
Ocp-Apim-Subscription-Key
with your API Key.
Request body:
{
"WebAlias": "my-web-alias",
"Username": "myUsername",
"CustomerType": 1,
"CustomerStatus": 1,
"AssociateCustom":
{
"Field1": "value here",
"Field2": "value here",
}
}
- Replace the values of
WebAlias
,Username
,CustomerType
, andCustomerStatus
with your desired values. You can use Get Customer to call the Associate's info. - The
AssociateCustom
parameter is an array that you pass the CRM_CustomFields column name (Field1
,Field2
,Field3
, etc.) and assign it a custom field value string.
Updated almost 4 years ago