cancelReceiptAdvice is a GraphQL mutation of the Chameleoon MAX API. Send it as POST https://max-api.chameleoon.sk/api/v1/graphql with your API key, see Chameleoon MAX .
Cancels an OPEN receipt advice that no receipt answers. Call it when the supplier calls the
delivery off before anything arrives.
Permissions
Requires the same permissions as updateReceiptAdvice .
Errors
Any other advice is refused with CONFLICT and one of these values of extensions.reason:
Reason When ADVICE_NOT_OPENThe advice is not OPEN. ADVICE_HAS_RECEIPTSAny receipt names the advice, in any status, including a draft or a cancelled receipt.
An error whose path runs below this field does not mean the call failed: the receipt advice
was cancelled, so do not retry. See Mutation .
Good to know
The cancelled advice keeps its number.
An advice that goods arrived against is not cancelled: a user in MAX closes it once its
differences are resolved.
Arguments
Returns
ReceiptAdvice!
Example
Mutation
mutation cancelReceiptAdvice ( $id : UUID ! ) {
cancelReceiptAdvice ( id : $id ) {
id
number
kind
status
state
supplierId
supplier {
id
code
name
registrationId
taxId
vatId
}
warehouseId
warehouse {
id
code
name
street
city
postalCode
}
legalEntityId
supplierReference
advisedAt
expectedAt
currencyCode
pricesIncludeVat
note
openedAt
closedAt
cancelledAt
lines ( first : 10 ) {
totalCount
}
parameters ( first : 10 ) {
totalCount
}
progress {
linesStarted
linesDone
linesInProgress
linesRemaining
activeDocuments
startedAt
}
receipts ( first : 10 ) {
totalCount
}
}
}
Variables
{
"id" : "00000000-0000-4000-8000-000000000001"
}
Response
{
"data" : {
"cancelReceiptAdvice" : {
"id" : "00000000-0000-4000-8000-000000000001" ,
"number" : "example" ,
"kind" : "DELIVERY_NOTE" ,
"status" : "DRAFT" ,
"state" : "DRAFT" ,
"supplierId" : "00000000-0000-4000-8000-000000000001" ,
"supplier" : {
"id" : "00000000-0000-4000-8000-000000000001" ,
"code" : "example" ,
"name" : "example" ,
"registrationId" : "example" ,
"taxId" : "example" ,
"vatId" : "example"
},
"warehouseId" : "00000000-0000-4000-8000-000000000001" ,
"warehouse" : {
"id" : "00000000-0000-4000-8000-000000000001" ,
"code" : "example" ,
"name" : "example" ,
"street" : "example" ,
"city" : "example" ,
"postalCode" : "example"
},
"legalEntityId" : "00000000-0000-4000-8000-000000000001" ,
"supplierReference" : "example" ,
"advisedAt" : "2026-01-01T00:00:00Z" ,
"expectedAt" : "2026-01-01T00:00:00Z" ,
"currencyCode" : "example" ,
"pricesIncludeVat" : true ,
"note" : "example" ,
"openedAt" : "2026-01-01T00:00:00Z" ,
"closedAt" : "2026-01-01T00:00:00Z" ,
"cancelledAt" : "2026-01-01T00:00:00Z" ,
"lines" : {
"totalCount" : 1
},
"parameters" : {
"totalCount" : 1
},
"progress" : {
"linesStarted" : 1 ,
"linesDone" : 1 ,
"linesInProgress" : 1 ,
"linesRemaining" : 1 ,
"activeDocuments" : 1 ,
"startedAt" : "2026-01-01T00:00:00Z"
},
"receipts" : {
"totalCount" : 1
}
}
}
}
Values are illustrative: replace IDs and codes with your own before you send the call.