updateTransferAdvice mutation
updateTransferAdvice 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.
Updates an OPEN transfer advice in one transaction: all of it happens or none of it. Call it
when the work to be done changes.
Permissions
Requires the transferAdvice.write and transferAdvice.read permissions, with both
warehouses in your API key's warehouse scope and the company in its legal-entity scope.
Repeated calls
requestId makes a retry after a lost response safe. Use a new requestId for every change
you intend.
- The same
requestIdwith the same input returnsapplied: falseand the transfer advice as it is now, even if it has closed since. Nothing changes. - The same
requestIdwith other input, or on another transfer advice, returnsCONFLICTwithextensions.reasonREQUEST_ID_REUSED.
Order of the changes
MAX applies removeLineIds, updateLines and addLines, in that order. Then it applies
plannedAt and reference, and then parameters.
Rules
- A line that has moved goods keeps its product, bins and lot
(
TRANSFER_ADVICE_LINE_LOCKED). - Its quantity may not drop below what has moved (
TRANSFER_ADVICE_QUANTITY_BELOW_MOVED). - A line that a transfer links cannot be removed (
TRANSFER_ADVICE_LINE_LINKED). - The transfer advice keeps at least one line (
TRANSFER_ADVICE_LAST_LINE). This is judged after the whole call, so you can replace an only line. - When every line has moved its quantity, the transfer advice closes.
Errors
- An error about one item names the item's index in its list, in
extensions.removeIndex,extensions.updateIndexorextensions.addIndex. - A refusal is
CONFLICTwith the reason inextensions.reason. A transfer advice that is notOPENreturnsTRANSFER_ADVICE_STATUS.
Good to know
- The state
AWAITINGdoes not mean that nobody works on the transfer advice. A warehouse worker may already be scanning it into a draft transfer.
An error whose path runs below this field does not mean the call failed: the change was applied, so do not retry. See
Mutation.
Costs 1 point plus 1 per line removed, changed or added and 1 per parameter set or removed, plus its selection.
Arguments
id:UUID!· requiredinput:UpdatePublicTransferAdviceInput!· required
Returns
UpdatePublicTransferAdviceResult!
Example
Mutation
Code
Variables
Code
Response
Code
Values are illustrative: replace IDs and codes with your own before you send the call.