setDefaultPaymentTerm
Requires at least one of the permissions settings:sales:update or settings:tenant:update.
Makes one payment term the organization's default for new documents, and clears the flag on the previous default so there is exactly one. An inactive term cannot be the default: reactivate it first.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation SetDefaultPaymentTerm($id: ID!) {
setDefaultPaymentTerm(id: $id) {
id
code
createdAt
description
isActive
isDefault
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation SetDefaultPaymentTerm($id: ID!) {\n setDefaultPaymentTerm(id: $id) {\n id\n code\n createdAt\n description\n isActive\n isDefault\n }\n}",
"variables": {
"id": "id"
}
}
EOF
Variables:
{
"id": "id"
}
Response:
{
"data": {
"setDefaultPaymentTerm": {
"id": "id",
"code": "string",
"createdAt": "2025-01-15T00:00:00Z",
"description": "string",
"isActive": true,
"isDefault": true
}
}
}
setDefaultPaymentTerm(
id: ID!
): PaymentTerm!
Arguments
setDefaultPaymentTerm.id ● ID! non-null scalar
The ID of the payment term to make the organization's default.
Type
PaymentTerm object
An organization's payment term, such as Net 30, that sets when an invoice is due.