Payment Terms
Payment-term presets (net days) used by customers and invoices.
GET
/api/v1/payment-termsList payment terms
Scope:
paymentTerms.readParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | number | Optional | 1-based page number. |
limit | query | number | Optional | Page size, max 200. |
Example request
curl "https://invoice.avscorp.in/api/v1/payment-terms" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"id": "clxpt00000000000000000001",
"organizationId": "clx0org000000000000000001",
"name": "Net 30",
"days": 30,
"isDefault": true,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}Possible errors: unauthorized, insufficient_scope, forbidden
POST
/api/v1/payment-termsCreate a payment term
Scope:
paymentTerms.createRequest body
| Field | Type | Required | Constraints |
|---|---|---|---|
name | string | Required | min length 1; max length 100 |
days | integer | Required | min 0; max 365 |
isDefault | boolean | Optional | default false |
Example request
curl -X POST "https://invoice.avscorp.in/api/v1/payment-terms" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Net 30",
"days": 30
}'Example response
JSON
{
"id": "clxpt00000000000000000001",
"organizationId": "clx0org000000000000000001",
"name": "Net 30",
"days": 30,
"isDefault": true,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}Possible errors: unauthorized, insufficient_scope, forbidden, validation_error
GET
/api/v1/payment-terms/{id}Get a payment term
Scope:
paymentTerms.readParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Required | Payment term ID. |
Example request
curl "https://invoice.avscorp.in/api/v1/payment-terms/clxpt00000000000000000001" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"id": "clxpt00000000000000000001",
"organizationId": "clx0org000000000000000001",
"name": "Net 30",
"days": 30,
"isDefault": true,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}Possible errors: unauthorized, insufficient_scope, forbidden, not_found
PATCH
/api/v1/payment-terms/{id}Update a payment term
Scope:
paymentTerms.updatePATCH validates against the full payment term schema (same as create) — name and days are required in every update, not just changed fields.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Required | Payment term ID. |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
name | string | Required | min length 1; max length 100 |
days | integer | Required | min 0; max 365 |
isDefault | boolean | Optional | default false |
Example request
curl -X PATCH "https://invoice.avscorp.in/api/v1/payment-terms/clxpt00000000000000000001" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Net 45",
"days": 45
}'Example response
JSON
{
"id": "clxpt00000000000000000001",
"organizationId": "clx0org000000000000000001",
"name": "Net 30",
"days": 30,
"isDefault": true,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}Possible errors: unauthorized, insufficient_scope, forbidden, not_found, validation_error
DELETE
/api/v1/payment-terms/{id}Delete a payment term
Scope:
paymentTerms.deleteParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Required | Payment term ID. |
Example request
curl -X DELETE "https://invoice.avscorp.in/api/v1/payment-terms/clxpt00000000000000000001" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"deleted": true
}Possible errors: unauthorized, insufficient_scope, forbidden, not_found