updateDebitNote
Requires permission purchase:debit_note:update.
Changes a debit note. Only a PENDING note can be edited. A note raised from a return can change its amounts only to the return's own figures. Needs the debit notes feature on your plan.
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 UpdateDebitNote($id: ID!, $input: UpdateDebitNoteInput!) {
updateDebitNote(id: $id, input: $input) {
message
success
debitNote {
id
debitNoteNumber
partnerName
status
type
createdAt
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation UpdateDebitNote($id: ID!, $input: UpdateDebitNoteInput!) {\n updateDebitNote(id: $id, input: $input) {\n message\n success\n debitNote {\n id\n debitNoteNumber\n partnerName\n status\n type\n createdAt\n }\n }\n}",
"variables": {
"id": "id",
"input": {}
}
}
EOF
Variables:
{
"id": "id",
"input": {}
}
Response:
{
"data": {
"updateDebitNote": {
"message": "string",
"success": true,
"debitNote": {
"id": "id",
"debitNoteNumber": "string",
"partnerName": "string",
"status": "string",
"type": "string",
"createdAt": "2025-01-15T00:00:00Z"
}
}
}
}
updateDebitNote(
id: ID!
input: UpdateDebitNoteInput!
): DebitNoteResponse!
Arguments
updateDebitNote.id ● ID! non-null scalar
The ID of the debit note.
updateDebitNote.input ● UpdateDebitNoteInput! non-null input
The fields of the debit note to change.
Type
DebitNoteResponse object
The result of a debit note change.