Skip to main content

setOrderCustomFields

Merges the given custom fields into the order, regardless of how the order was created. The payload is a JSON object keyed by custom field technical name; keys not present in the payload keep their current value, and a key present with value null is stored as null. Only keys defined for orders are accepted. Returns the updated order.

Required scopes​

The token needs the orders:write access scope.

setOrderCustomFields(
id: ID!
customFields: JSON!
): Order!

Arguments​

setOrderCustomFields.id ● ID! non-null scalar​

ID of the order to update.

setOrderCustomFields.customFields ● JSON! non-null scalar​

Custom fields to merge, as a JSON object keyed by custom field technical name (e.g. { myField: "value", anotherField: null }).

Type​

Order object​

A customer order.