Skip to main content
Log inSign up
Anchor to orderEditAddCustomItem

orderEditAddCustomItem

mutation

Requires write_order_edits access scope. Also: To use the GraphQL Admin API to edit orders, your app needs to request the write_order_edits access scope for a Shopify store.

Adds a custom line item to an existing order. For example, you could add a gift wrapping service as a custom line item. To learn how to edit existing orders, refer to Edit an existing order with Admin API.

•
ID!required

The ID of the calculated order to which the custom item is added.

•

The ID of the retail location (if applicable) from which the custom item is sold. Used for tax calculations. A default location will be chosen automatically if none is provided.

•
MoneyInput!required

The unit price of the custom item. This value can't be negative.

•
Int!required

The quantity of the custom item. This value must be greater than zero.

•

Whether the custom item requires shipping. Defaults to false.

•

Whether the custom item is taxable. Defaults to true.

•
String!required

The name of the custom item to add.


Was this section helpful?

Anchor to OrderEditAddCustomItemPayload returnsOrderEditAddCustomItemPayload returns

•

The custom line item that will be added to the order based on the current edits.

•

An order with the edits applied but not saved.

•

The list of errors that occurred from executing the mutation.


Was this section helpful?