customAttributes of LineItemMutable

New Member
2 0 1

We are trying to add some key/value pairs under order's line item objects.


The closest things we could find in the API spec is the customAttributes under LineItemMutable:



We could get the field by using graphQL



However, we can't find any mutation query for updating this field.

May i know if this field can be created/updated through API (Both graphQL or Restful API is OK), thanks.

Replies 2 (2)
Shopify Staff
Shopify Staff
233 39 28

Hey @raychoi,

Great question here, I wanted to share a few insights to get you started. Utilizing the outlined functionality really depends on what stage of an order you plan or need customAttributes attached. For example, if you want to do this after an order has already been completed with the Admin API, the mutation orderUpdate will allow you to add customAttributes via GraphQL. I'd also suggest exploring some of our other resources, Metafields and the Storefront API may provide insights on similar and related functionalities - Cheers!

awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit or the Shopify Web Design and Development Blog

New Member
2 0 1

Thanks for your reply.

We checked mutation orderUpdate before, but what we really want is update/create the customAttributes of LineItemMutable object.

May i know if any API could do so?