orderEditAddCustomItem mutation
Add a custom item to the order.
Required access
write_order_edits access scope.
On this page
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.
mutation orderEditAddCustomItem($id: ID!, $title: String!, $price: MoneyInput!, $quantity: Int!) { orderEditAddCustomItem(id: $id, title: $title, price: $price, quantity: $quantity) {} } { “id”: “Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE=”, “title”: “placeholder”, “price”: {
<font style="color:#1F61A0;">calculatedLineItem</font> <font style="color:#555555;">{</font><font style="color:#1F61A0;">id</font><font style="color:#555555;">}</font><font style="color:#1F61A0;">calculatedOrder</font> <font style="color:#555555;">{</font><font style="color:#1F61A0;">id</font><font style="color:#555555;">}</font><font style="color:#1F61A0;">userErrors</font> <font style="color:#555555;">{</font><font style="color:#1F61A0;">field</font><font style="color:#1F61A0;">message</font><font style="color:#555555;">}</font>
<font style="color:#8B2BB9;">"amount"</font><font style="color:#555555;">:</font> <font style="color:#D64292;">"placeholder"</font><font style="color:#555555;">,</font>
<font style="color:#8B2BB9;">"currencyCode"</font><font style="color:#555555;">:</font> <font style="color:#D64292;">"placeholder"</font>
  },
  “quantity”: 1
}
Arguments
MoneyInput fields
- amount (
[Decimal!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#decimal-2021-01)) REQUIRED
Decimal money amount. - currencyCode (
[CurrencyCode!](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/currencycode)) REQUIRED
Currency of the money. 
Return fields
- calculatedLineItem (
[CalculatedLineItem](https://shopify.dev/docs/admin-api/graphql/reference/orders/calculatedlineitem))
The added line item. - calculatedOrder (
[CalculatedOrder](https://shopify.dev/docs/admin-api/graphql/reference/orders/calculatedorder))
An order with the edits calculated. - userErrors (
[[UserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/usererror))
List of errors that occurred executing the mutation. 
