Update Payment Term
Updates an existing payment term. Only the fields you send are changed.
HTTP Request
- URL:
/paymentTerms/{id} - Method:
PUT - Headers:
accessToken: Required. Your API access token.Content-Type:application/json
- Required scope:
READ_ORDERorREAD_WRITE_ORDER
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | String | Required. The ID of the payment term to update. |
Request Body
Send at least one of the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
name | String | No | Name of the payment term. Must be unique. |
status | Boolean | No | Whether the payment term is active. |
dueType | String | No | net or fulfillment. |
paymentDueDays | Number | No | Number of days until payment is due. Required when dueType is net. |
cURL Example
curl --location --request PUT '<BASE_URL>/paymentTerms/67a46366869ddc960b432623' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Net 90",
"dueType": "net",
"paymentDueDays": 90
}'
Response
- 200 OK: The payment term was updated successfully.
- 400 Bad Request: The access token is missing or invalid, a field is not valid, the name is already used, or no payment term matches the ID.
Sample JSON Response
{
"success": true,
"data": {
"id": "67a46366869ddc960b432623",
"name": "Net 90",
"status": true,
"dueType": "net",
"paymentDueDays": 90,
"createdAt": "2025-02-06T07:23:18.394Z",
"updatedAt": "2025-02-10T12:05:44.910Z"
}
}
Response Details
| Field | Type | Description |
|---|---|---|
success | Boolean | Whether the request was successful. |
data | Object | The updated payment term. See Payment Term Data. |