Chameleoon MAX · Integrations
reportError mutation
reportError 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.
Reports that an external system failed to do something with a record in MAX. Call it once for each occurrence of the error, for example each time your system fails to carry a receipt over.
Grouping
- Occurrences with the same
subject,lineId,sourceandcodeare grouped into one report and counted. - A new report is created with the status
OPEN. - An occurrence on a
RESOLVEDreport reopens it and marks itregressed. - An occurrence on a
MUTEDreport leaves it muted until itsmutedUntilhas passed, and reopens it after that. - MAX builds the link to the Integrations platform from
integrationsTarget. Send no URL.
Permissions
- Requires the
errorReport.writepermission and the read permission of the document's kind, for examplereceipt.readfor a receipt. Without the read permission, the error isFORBIDDEN_ROLEnaming it. - The document must be in your API key's warehouse and legal-entity scope.
Repeated calls
requestId makes a retry after a lost response safe for 7 days.
- The same
requestIdwith the same input returnscounted: falseandcreated: false, with the report as it is now. If its document has since been discarded, the error isNOT_FOUNDwith the fieldsubject. - The same
requestIdwith different input isCONFLICTwith the reasonREQUEST_ID_REUSED. - After 7 days MAX forgets the
requestId, and the same call counts as a new occurrence.
Errors
| Code | Reason | When |
|---|---|---|
NOT_FOUND with the field subject | The document does not exist or is outside your API key's scope. | |
NOT_FOUND with the field lineId | The line is not on the document. | |
VALIDATION | A field is malformed. The error names the field. | |
CONFLICT | REQUEST_ID_REUSED | The requestId was used before with different input. |
The reason is in extensions.reason.
An error whose path runs below this field does not mean the call failed: the occurrence was recorded, so do not retry. See
Mutation.
Arguments
input:ReportErrorInput!· required
Returns
Example
Mutation
Code
Variables
Code
Response
Code
Values are illustrative: replace IDs and codes with your own before you send the call.