setTransferExternalRef mutation
setTransferExternalRef 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.
Records the transfer's reference in an external source: the record that another system made of the transfer. Call it after your system has recorded the transfer.
Permissions
Requires the integration.read, transfer.read and transfer.write permissions, with the
transfer in your API key's scope.
Repeated calls
The same externalId with the same number is a repeat and returns changed: false.
How references are shaped
- A system with a native transfer makes one record of it. Send one reference without a
side. - OBERON makes two notes, a release and a receipt. Send one reference per side,
OUTandIN, with its GUID asexternalIdand its number asexternalNumber. - In one external source, a transfer has either the one reference without a side or the sided
ones, never both. A write of the other shape is
VALIDATION(fieldinput.side) until the references there are removed withremoveTransferExternalRef, each side on its own. - A different
externalIdreplaces the transfer's earlier reference in that external source (on that side). - The call writes no event and no revision of the transfer.
Errors
The reason is in extensions.reason.
| Code | Reason | When |
|---|---|---|
NOT_FOUND | There is no such transfer, it is a draft, or your API key cannot see it. | |
NOT_FOUND | SOURCE_NOT_FOUND (field input.source) | There is no such external source. |
CONFLICT | SOURCE_ARCHIVED | The external source is archived. |
CONFLICT | REF_TAKEN | Another transfer holds that externalId (on that side) in the external source. |
VALIDATION | The id is blank, or the id or number is too long (field input.externalId or input.externalNumber). |
An error whose path runs below this field does not mean the call failed: the reference was recorded, so do not retry. See
Mutation.
Arguments
id:UUID!· requiredinput:TransferExternalRefInput!· required
Returns
Example
Mutation
Code
Variables
Code
Response
Code
Values are illustrative: replace IDs and codes with your own before you send the call.