Chameleoon MAX · Documents
removeDocument mutation
removeDocument 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.
Removes a document. Call it when a document no longer belongs to its order or invoice.
The document is gone from every read and its download. MAX keeps its versions.
Permissions
Requires the permission to write the document's target, with that target in your API key's scope:
order.writefor a sales order's document.invoice.syncfor an invoice's document.
Without it, the document is NOT_FOUND on documentId.
Repeated calls
A replay of the call that removed the document returns applied: false with the same
documentId.
Errors
CONFLICTwithextensions.reasonDOCUMENT_REMOVEDwhen the document was removed already, by another call.CONFLICTwithextensions.reasonORDER_STATUSwhen the order is notCONFIRMED,COMPLETEDorCANCELLED.CONFLICTwithextensions.reasonINVOICE_REMOVEDwhen the invoice was removed in its accounting system.
Arguments
input:RemoveDocumentInput!· required
Returns
Example
Mutation
Code
Variables
Code
Response
Code
Values are illustrative: replace IDs and codes with your own before you send the call.