--- title: orderEditAddCustomItem - GraphQL Admin description: Adds a custom line item to an existing order. For example, you could add a gift wrapping service as a [custom line item](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing#add-a-custom-line-item). To learn how to edit existing orders, refer to [Edit an existing order with Admin API](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). api_version: 2025-10 api_name: admin type: mutation api_type: graphql source_url: html: https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditAddCustomItem md: https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditAddCustomItem.md --- # order​Edit​Add​Custom​Item 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](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing#add-a-custom-line-item). To learn how to edit existing orders, refer to [Edit an existing order with Admin API](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). ## Arguments * id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) or the order edit session to edit. This is the edit to which the custom item is added. * location​Id [ID](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) The ID of the retail [location](https://shopify.dev/api/admin-graphql/latest/objects/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. * price [Money​Input!](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/MoneyInput) required The unit price of the custom item. This value can't be negative. * quantity [Int!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int) required The quantity of the custom item. This value must be greater than zero. * requires​Shipping [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean) Whether the custom item requires shipping. Defaults to `false`. * taxable [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean) Whether the custom item is taxable. Defaults to `true`. * title [String!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) required The name of the custom item to add. *** ## Order​Edit​Add​Custom​Item​Payload returns * calculated​Line​Item [Calculated​Line​Item](https://shopify.dev/docs/api/admin-graphql/latest/objects/CalculatedLineItem) The custom line item that will be added to the order based on the current edits. * calculated​Order [Calculated​Order](https://shopify.dev/docs/api/admin-graphql/latest/objects/CalculatedOrder) An order with the edits applied but not saved. * order​Edit​Session [Order​Edit​Session](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderEditSession) The order edit session with the edits applied but not saved. * user​Errors [\[User​Error!\]!](https://shopify.dev/docs/api/admin-graphql/latest/objects/UserError) non-null The list of errors that occurred from executing the mutation. *** ## Examples * ### orderEditAddCustomItem reference ## Mutation Reference ```graphql mutation orderEditAddCustomItem($id: ID!, $title: String!, $locationId: ID, $price: MoneyInput!, $quantity: Int!, $taxable: Boolean, $requiresShipping: Boolean) { orderEditAddCustomItem(id: $id, title: $title, locationId: $locationId, price: $price, quantity: $quantity, taxable: $taxable, requiresShipping: $requiresShipping) { calculatedLineItem { # CalculatedLineItem fields } calculatedOrder { # CalculatedOrder fields } orderEditSession { # OrderEditSession fields } userErrors { field message } } } ``` ## Input ```json { "id": "gid://shopify//10079785100", "title": "", "locationId": "gid://shopify//10079785100", "price": { "amount": "29.99", "currencyCode": "USD" }, "quantity": 1, "taxable": true, "requiresShipping": true } ``` ##### Variables ``` { "id": "gid://shopify//10079785100", "title": "", "locationId": "gid://shopify//10079785100", "price": { "amount": "29.99", "currencyCode": "USD" }, "quantity": 1, "taxable": true, "requiresShipping": true } ``` ##### Schema ``` input MoneyInput { amount: Decimal! currencyCode: CurrencyCode! } ```