removeDebitNote
Requires permission purchase:debit_note:delete.
Deletes a debit note. A note that has been applied cannot be deleted. 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 RemoveDebitNote($id: ID!) {
removeDebitNote(id: $id) {
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 RemoveDebitNote($id: ID!) {\n removeDebitNote(id: $id) {\n message\n success\n debitNote {\n id\n debitNoteNumber\n partnerName\n status\n type\n createdAt\n }\n }\n}",
"variables": {
"id": "id"
}
}
EOF
Variables:
{
"id": "id"
}
Response:
{
"data": {
"removeDebitNote": {
"message": "string",
"success": true,
"debitNote": {
"id": "id",
"debitNoteNumber": "string",
"partnerName": "string",
"status": "string",
"type": "string",
"createdAt": "2025-01-15T00:00:00Z"
}
}
}
}
removeDebitNote(
id: ID!
): DebitNoteResponse!
Arguments
removeDebitNote.id ● ID! non-null scalar
The ID of the debit note.
Type
DebitNoteResponse object
The result of a debit note change.