addInvoiceTag mutation
addInvoiceTag 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 invoice. 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 invoice reaches a state people in MAX
should see on it, such as paid or sent to the customer.
syncInvoice never changes the invoice's tags, so a tag stays through every later
sync.
When the tag belongs to a group that holds one tag at a time (TagGroup.exclusive), the
invoice's other tag of that group is taken off: to move the invoice from one state 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 invoice.read and invoice.write permissions.
Repeated calls
A tag the invoice 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 the invoice's register (TagAgenda: issued, advance or received invoices).NOT_FOUNDwhen the invoice does not exist or your API key cannot see it.
Arguments
ref:InvoiceRefInput!· 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.