Get Payment Terms
Retrieves a paginated list of payment terms, such as "Net 30" or "Due on fulfillment". Payment terms can be assigned to companies and orders.
HTTP Request
- URL:
/paymentTerms - Method:
GET - Headers:
accessToken: Required. Your API access token.
- Required scope:
READ_ORDER
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | Number | Page number to retrieve. Default is 1. |
limit | Number | Number of payment terms per page. Default is 10. |
status | Boolean | Use true for active payment terms or false for inactive ones. |
ids | String | Comma-separated list of payment term IDs. |
cURL Example
curl --location '<BASE_URL>/paymentTerms?page=1&limit=20&status=true' \
--header 'accessToken: <ACCESS_TOKEN>'
Response
- 200 OK: The list of payment terms was returned successfully.
- 400 Bad Request: The access token is missing or invalid, the token does not have the required scope, or a query parameter is not valid.
Sample JSON Response
{
"success": true,
"data": [
{
"id": "67a1ed576ec18627bb245946",
"name": "Due on fulfillment",
"status": true,
"dueType": "fulfillment",
"paymentDueDays": 0,
"createdAt": "2025-02-04T10:35:03.014Z",
"updatedAt": "2025-02-04T10:40:21.065Z"
},
{
"id": "67a1eeba9269290064a159a4",
"name": "Net 30",
"status": true,
"dueType": "net",
"paymentDueDays": 30,
"createdAt": "2025-02-04T10:40:58.825Z",
"updatedAt": "2025-02-04T10:40:58.825Z"
}
],
"pagination": {
"page": 1,
"total": 2,
"count": 2
}
}
Response Details
| Field | Type | Description |
|---|---|---|
success | Boolean | Whether the request was successful. |
data | Array | List of payment terms. See below. |
pagination | Object | Pagination details. See below. |
Payment Term Data
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier of the payment term. |
name | String | Name of the payment term. |
status | Boolean | Whether the payment term is active. |
dueType | String | net (due a number of days later) or fulfillment (due when the order is fulfilled). |
paymentDueDays | Number | Number of days until payment is due. |
createdAt | String | Date and time the payment term was created (ISO 8601). |
updatedAt | String | Date and time the payment term was last updated (ISO 8601). |
Pagination Details
| Field | Type | Description |
|---|---|---|
page | Number | Current page number. |
total | Number | Total number of payment terms that match. |
count | Number | Number of payment terms returned on this page. |