orderEditAddCustomItem mutation

Version 2020-10 (Release candidate)

Add a custom item to the order.

Required access

write_order_edits access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

id ( ID! ) required

The ID of the calculated order to add an item to.

locationId ( ID )

The ID of the location that this item will be fulfilled from. A default will be chosen automatically if none is provided.

price ( MoneyInput! ) required

The price of the custom item to add. It cannot be negative.

quantity ( Int! ) required

The quantity of the custom item to add. It must be greater than zero.

requiresShipping ( Boolean )

Whether or not the item requires shipping. Default is false.

taxable ( Boolean )

Whether or not the item is taxable. Default is true.

title ( String! ) required

The name of the custom item to add.

MoneyInput fields

amount (Decimal!) Required

Decimal money amount.

currencyCode (CurrencyCode!) Required

Currency of the money.

Return fields

calculatedLineItem (CalculatedLineItem)

The added line item.

calculatedOrder (CalculatedOrder)

An order with the edits calculated.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

Version 2020-07 (Latest)

Add a custom item to the order.

Required access

write_order_edits access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

id ( ID! ) required

The ID of the calculated order to add an item to.

locationId ( ID )

The ID of the location that this item will be fulfilled from. A default will be chosen automatically if none is provided.

price ( MoneyInput! ) required

The price of the custom item to add. It cannot be negative.

quantity ( Int! ) required

The quantity of the custom item to add. It must be greater than zero.

requiresShipping ( Boolean )

Whether or not the item requires shipping. Default is false.

taxable ( Boolean )

Whether or not the item is taxable. Default is true.

title ( String! ) required

The name of the custom item to add.

MoneyInput fields

amount (Decimal!) Required

Decimal money amount.

currencyCode (CurrencyCode!) Required

Currency of the money.

Return fields

calculatedLineItem (CalculatedLineItem)

The added line item.

calculatedOrder (CalculatedOrder)

An order with the edits calculated.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

Version 2020-04

Add a custom item to the order.

Required access

write_order_edits access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

id ( ID! ) required

The ID of the calculated order to add an item to.

locationId ( ID )

The ID of the location that this item will be fulfilled from. A default will be chosen automatically if none is provided.

price ( MoneyInput! ) required

The price of the custom item to add. It cannot be negative.

quantity ( Int! ) required

The quantity of the custom item to add. It must be greater than zero.

requiresShipping ( Boolean )

Whether or not the item requires shipping. Default is false.

taxable ( Boolean )

Whether or not the item is taxable. Default is true.

title ( String! ) required

The name of the custom item to add.

MoneyInput fields

amount (Decimal!) Required

Decimal money amount.

currencyCode (CurrencyCode!) Required

Currency of the money.

Return fields

calculatedLineItem (CalculatedLineItem)

The added line item.

calculatedOrder (CalculatedOrder)

An order with the edits calculated.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

Version 2020-01

Add a custom item to the order.

Required access

write_order_edits access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

id ( ID! ) required

The ID of the calculated order to add an item to.

locationId ( ID )

The ID of the location that this item will be fulfilled from. A default will be chosen automatically if none is provided.

price ( MoneyInput! ) required

The price of the custom item to add. It cannot be negative.

quantity ( Int! ) required

The quantity of the custom item to add. It must be greater than zero.

requiresShipping ( Boolean )

Whether or not the item requires shipping. Default is false.

taxable ( Boolean )

Whether or not the item is taxable. Default is true.

title ( String! ) required

The name of the custom item to add.

MoneyInput fields

amount (Decimal!) Required

Decimal money amount.

currencyCode (CurrencyCode!) Required

Currency of the money.

Return fields

calculatedLineItem (CalculatedLineItem)

The added line item.

calculatedOrder (CalculatedOrder)

An order with the edits calculated.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.