Skip to main content

deletePaymentTerm

Requires at least one of the permissions settings:sales:delete or settings:tenant:update.

Deletes a payment term: it leaves the settings list and every picker, and no new document can use it. Documents created before the delete keep the term, its label and their due dates. The code cannot be reused. The current default cannot be deleted: choose another default first. A term that any customer, supplier or vendor account still holds as their default cannot be deleted either (error code PAYMENT_TERM_IN_USE) unless moveToCode names an active term to move them to: then every live partner (any role) and vendor account holding it moves to that term in the same transaction as the delete, and documents are left untouched. Without moveToCode the refusal is unchanged.

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:

mutation DeletePaymentTerm($id: ID!) {
deletePaymentTerm(id: $id)
}

Variables:

{
"id": "id"
}

Response:

{
"data": {
"deletePaymentTerm": true
}
}
deletePaymentTerm(
id: ID!
moveToCode: String
): Boolean!

Arguments​

deletePaymentTerm.id ● ID! non-null scalar​

The ID of the payment term to delete.

deletePaymentTerm.moveToCode ● String scalar​

Code of an active payment term to move every customer, supplier, other partner and vendor account holding the deleted term to. Omit to refuse deleting a held term.

Type​

Boolean scalar​

The Boolean scalar type represents true or false.