reportSalesOrderItemWriteBack mutation
reportSalesOrderItemWriteBack 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 the result of writing one of the order's goods lines back to the external source. Call it after a user changed the line in MAX and your integration wrote the change to the external source's order.
Send one of the following:
externalId: the external source's id of the item it created for the line. MAX links it as the external source's line, so the next change of the order from the external source matches it.problem: why the external source refused the line. MAX shows it as the warningSHOP_ITEM_NOT_WRITTENon the line. This applies to a removed line too, while the external source still has its item.- Neither: the line was written as it is linked (changed or removed). MAX resolves the warning, as linking the line would.
Name the order by source and externalId, or by its MAX id. With the MAX id, the
external order is the one this order was placed as.
Permissions
Requires the order.write and order.read permissions.
Errors
VALIDATIONfor anexternalIdover 255 characters.CONFLICTwhen theexternalIdbelongs to another line.NOT_FOUNDwhen the order or the line does not exist, or your API key cannot see it.
An error whose path runs below this field does not mean the call failed: the result was recorded, so do not retry. See
Mutation.
Arguments
ref:SalesOrderRefInput!· requiredinput:SalesOrderItemWriteBackInput!· required
Returns
Example
Mutation
Code
Variables
Code
Response
Code
Values are illustrative: replace IDs and codes with your own before you send the call.