addSalesOrderTag mutation
addSalesOrderTag 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.
Puts a tag on the order. Name the tag by its code, as tags lists it: a code stays
when a user renames the tag in MAX. Call it when the order reaches a state in the external
source that people in MAX should see on it, such as a shop's own order status.
When the tag belongs to a group that holds one tag at a time (TagGroup.exclusive), the order's
other tag of that group is taken off: to move the order from one status tag to the next, add
the next.
MAX does not create tags: a user creates them in MAX first. An archived tag cannot be added.
Permissions
Requires the order.write and order.read permissions.
Repeated calls
A tag the order already has changes nothing and returns changed: false.
Errors
VALIDATIONwith reasonTAG_NOT_FOUNDwhen no live tag in MAX has this code (an archived one does not count).VALIDATIONwhen the code is blank, or the tag is not used on sales orders.NOT_FOUNDwhen the order does not exist or your API key cannot see it.
Arguments
ref:SalesOrderRefInput!· requiredtag:String!· required
Returns
Example
Mutation
Code
Variables
Code
Response
Code
Values are illustrative: replace IDs and codes with your own before you send the call.