Chameleoon MAX
Writing data (mutations)
The operations that change data.
Errors below a mutation's result
An error whose path runs below a mutation's field, while the mutation's result is in data, is
not a failed call. It is a field your API key may not read (FORBIDDEN_ROLE,
FORBIDDEN_SCOPE), or a nested page that could not be read. That field is null, and the rest
of data is returned. The mutation happened: its result (for example created, changed or
warnings) is in data.
Do not retry a mutation because of such an error. Retry rules apply only to an error at the mutation's own field (
data.<field>is null and the error's path is[<field>]), or to a response withoutdata.
All mutations
Orders
createSalesOrderCreates a confirmed sales order from an order placed in an external source, such as an e-shop.markSalesOrderPaidMarks the order as paid in full.cancelSalesOrderCancels the order and releases its reserved stock.updateSalesOrderAddressesUpdates the order's billing address, delivery address or collection point with the external source's current values.updateSalesOrderDetailsUpdates the order's notes, contact, carrier and payment method with the external source's current values.updateSalesOrderItemsUpdates the order's items and charges to match the external source's current ones.reportSalesOrderItemWriteBackReports the result of writing one of the order's goods lines back to the external source.setSalesOrderInvoiceRecords the invoice that another system issued for the order.
Receipts
createReceiptAdviceCreates and opens one receipt advice in a single step.updateReceiptAdviceUpdates an OPEN receipt advice: removes, changes and adds lines, and changes its header terms and parameters.cancelReceiptAdviceCancels an OPEN receipt advice that no receipt answers.setReceiptExternalRefRecords the receipt's reference in an external source: the record that the external system made of the receipt.removeReceiptExternalRefRemoves the receipt's reference in an external source.
Transfers
createTransferAdviceCreates a transfer advice and opens it, in one transaction.updateTransferAdviceUpdates an OPEN transfer advice in one transaction: all of it happens or none of it.cancelTransferAdviceCancels an OPEN transfer advice that nothing has moved against, and releases its reservations.setTransferExternalRefRecords the transfer's reference in an external source: the record that another system made of the transfer.removeTransferExternalRefRemoves the transfer's reference in an external source on the side you name.
Products
setProductVariantExternalRefRecords the variant's reference in an external source: the variant's id in that system under the id of its product there, such as an e-shop's variant id or…removeProductVariantExternalRefRemoves the variant's reference in an external source.
Partners
setPartnerExternalRefRecords the partner's reference in an external source: the partner's id in that system, such as an e-shop's customer id or OBERON's firm id.removePartnerExternalRefRemoves the partner's reference in an external source.
Inventory
syncStockLevelsSets the stock of an externally managed warehouse to the quantities that the external system that manages the warehouse reports.confirmStockInExternalSystemRecords that the external system that manages the warehouse holds these receipts, issues and transfers up to their stockVersion, as of its own clock.
Invoices
attachInvoiceDocumentAttaches an uploaded file to an invoice imported from the accounting system, as the invoice's own PDF.syncInvoiceWrites the accounting system's document into MAX.removeInvoiceMarks a document as deleted in the accounting system.updateInvoiceUpdates the invoice's internal note.setInvoicePartnerSets, changes or clears the invoice's partner by hand.linkInvoiceLinks the invoice to a MAX document your API key can see.unlinkInvoiceRemoves the invoice's link to a MAX document your API key can see.
Shipments
shipFulfilmentMarks a fulfilment as shipped by another system.
Issues
reportExternalIssueRecords that an externally managed warehouse already took goods of the order off its stock with one of its own documents.setIssueExternalRefRecords the issue's reference in an external source: the record that the external system made of the issue.removeIssueExternalRefRemoves the issue's reference in an external source.
Documents
attachDocumentAttaches an uploaded file to a sales order as a document of a kind.addDocumentVersionMakes an uploaded file the document's next version, which becomes its current version.removeDocumentRemoves a document.
Assets
createAssetCreates an asset from an image you uploaded.updateAssetUpdates the asset's name or whether it is public.replaceAssetFileReplaces the asset's image with a new upload.deleteAssetDeletes the asset and its image, and returns the asset's MAX id.
Print templates
createPrintTemplateCreates a print template.updatePrintTemplateUpdates a print template's name, language, body or default flag.deletePrintTemplateDeletes the print template and returns its MAX id.setPrintTemplateArchivedArchives or restores a print template.copyPrintTemplateCopies a print template, or a MAX built-in template, under a new name.
Email templates
createEmailTemplateCreates an e-mail template of the organisation.copyEmailTemplateCopies a built-in or organisation template to a new code.updateEmailTemplateUpdates the template's head: its name, resource kind and defaults.setEmailTemplateVariantCreates or replaces one variant of the template.removeEmailTemplateVariantRemoves one variant of the template.setEmailTemplateTextsReplaces the template's whole dictionary of texts.saveEmailTemplateDesignSaves the design of a JSON template's one all-languages variant and replaces its whole dictionary, in one change.convertEmailTemplateToHtmlCreates a new HTML template from a JSON one.deleteEmailTemplateDeletes the template and returns its code.
Emails
sendEmailRenders an e-mail and queues it for delivery.sendTestEmailSends a template as a test to 1 to 5 addresses.
Tags
addSalesOrderTagPuts a tag on the order.removeSalesOrderTagTakes a tag off the order.modifySalesOrderTagsAdds, removes and clears several of the order's tags in one call, all or nothing.addInvoiceTagPuts a tag on the invoice.removeInvoiceTagTakes a tag off the invoice.modifyInvoiceTagsAdds, removes and clears several of the invoice's tags in one call, all or nothing.modifyReceiptTagsAdds, removes and clears the receipt's tags in one call, all or nothing -- as modifySalesOrderTags does for an order.modifyIssueTagsAdds, removes and clears the issue's tags in one call, all or nothing -- as modifySalesOrderTags does for an order.modifyTransferTagsAdds, removes and clears the transfer's tags in one call, all or nothing -- as modifySalesOrderTags does for an order.modifyReceiptAdviceTagsAdds, removes and clears the receipt advice's tags in one call, all or nothing -- as modifySalesOrderTags does for an order.modifyTransferAdviceTagsAdds, removes and clears the transfer advice's tags in one call, all or nothing -- as modifySalesOrderTags does for an order.modifyProductTagsAdds, removes and clears the product's tags in one call, all or nothing -- as modifySalesOrderTags does for an order.modifyPartnerTagsAdds, removes and clears the partner's tags in one call, all or nothing -- as modifySalesOrderTags does for an order.modifyLotTagsAdds, removes and clears the lot's tags in one call, all or nothing -- as modifySalesOrderTags does for an order.createTagCreates a tag.updateTagChanges a live tag, named by its code.archiveTagArchives a tag: it can no longer be added, and records that have it keep it.createTagGroupCreates a tag group: a set of tags with shared settings.updateTagGroupChanges a live tag group, named by its code.archiveTagGroupArchives a tag group: its tags can no longer be added, and records that have them keep them.
Integrations
reportErrorReports that an external system failed to do something with a record in MAX.