---
updatedAt: 2025-06-16T23:05:49.000Z
agentTools:
  projectIndex: https://developers.directscale.com/llms.txt
---

# Updating Associate Custom Fields with API

You can update the **dbo.CRM\_CustomFields** table via API using the [`PATCH` Update Customer By Parameter](https://apigateway.directscale.com/docs/services/57fe6761cb00f20ae896cc68/operations/593adc28b3ac880fe0fceb4c?) endpoint. This endpoint updates the customer information you pass in. You can use the `AssociateCustom` parameter available to update the [Associate Custom Fields](https://developers.directscale.com/docs/enabling-the-inventory-autoship-and-order-custom-fields).

> Request URL: `https://dsapi.directscale.com/v1/customers/{customerId}`

### Example Request

**Request Header**:

```json
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
```

1. 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](https://help.directscale.com/hc/en-us/articles/360046983634-Viewing-an-Associate-s-Detail-Summary) page (referred to as DirectScale ID here).
2. Replace the `Ocp-Apim-Subscription-Key` with your [API Key](https://developers.directscale.com/docs/public-api-overview).

**Request body**:

```json
{
  "WebAlias": "my-web-alias",
  "Username": "myUsername",
  "CustomerType": 1,
  "CustomerStatus": 1,
  "AssociateCustom":
  {
    "Field1": "value here",
    "Field2": "value here",
  }
}
```

1. Replace the values of `WebAlias`, `Username`, [`CustomerType`](https://help.directscale.com/hc/en-us/articles/360047422313-Base-Associate-Types-Associate-Types-and-Price-Groups-Explained), and [`CustomerStatus`](https://help.directscale.com/hc/en-us/articles/360052271634-Changing-Associate-Statuses) with your desired values. You can use [Get Customer](https://apigateway.directscale.com/docs/services/57fe6761cb00f20ae896cc68/operations/57fe68e3cb00f20ae896cc6a?) to call the Associate's info.
2. 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.