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.
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!