Support

updateLineItemById

View as Markdown

Updates a line item in a draft order

mutation

Requires one of commerce.order:create, commerce.order:update, commerce.order:cancel, or commerce.order:complete (use the scope that matches the operation).

Updates a line item in a draft order

Required headers

HeaderRequiredDescription
x-store-idYesID of the store the operation targets. Omitting it returns HTTP 200 with a GraphQL error: extensions.code: "UNAUTHENTICATED".

Go to Authentication for credential setup.

Arguments

  • input UpdateLineItemByIdInput! required
    • id ID! required — Global ID in format LineItem_\<KSUID\>
    • orderId ID! required — Global ID in format Order_\<KSUID\>
    • details LineItemInputDetailsInfo optional
    • discounts [DiscountInput!] optional
    • externalId String optional
    • fees [FeeInput!] optional
    • fulfillmentChannelId String optional
    • fulfillmentMode LineItemModeInput optional — Possible fulfillment modes for a line item
    • metafields [OrderMetafieldInput!] optional
    • name String optional
    • notes [NoteInput!] optional
    • productId String optional
    • quantity Float optional
    • serviceEndsAt DateTime optional
    • serviceStartAt DateTime optional
    • shipping LineItemInputShippingInfo optional
    • skuId String optional — Deprecated: This field is going to be removed. Remove and add a LineItem again instead.
    • tags [String!] optional
    • taxes [TaxInput!] optional
    • totals TotalsInput optional
    • type LineItemTypesInput optional — Possible types for a line item
    • unitAmount MoneyInput optional

Possible returns

  • LineItem LineItem

Last updated on

How is this guide?