Skip to main content
Log inSign up

Line item weight input for orderCreate mutation

We have enhanced the orderCreate mutation by adding an optional field, OrderCreateLineItemInput.weight, which allows you to specify the weight of each line item using the WeightInput object.

For line items linked to a product variant:

  • Specifying a weight will override the variant's default weight.
  • If no weight is specified, the variant's weight will be used by default.

For line items not linked to a product variant, such as custom items:

  • Specifying a weight will apply that weight to the line item.
  • If no weight is specified, the line item's weight will default to 0.

This is an improved version of the line_items.grams field that exists in the REST API.

Was this section helpful?