Update Sales Order Line

Beta
PATCH/v1/sales/sales-orders/{id}/lines/{line_id}

Idempotent with Idempotency-Key header. Learn more

Partially updates a sales order line item.

Permissions requiredValues:customers:updatesuppliers:updatesales_orders:update
The role behind your API key or agent must grant every one of these permissions.
idstring

Sales order ID.

line_idstring

Sales order line ID.

include[]optional arrayenumValues:productquantity_orderedunit_price

Sub-objects to expand in the response. When omitted, sub-objects are returned as null.

product_skuoptional string

Product SKU.

product_descriptionoptional string

Product description.

quantityoptional object

Quantity ordered.

valuestring (decimal)

Decimal value, as a string to preserve precision.

unit_idstring

ID of the unit of measure for the value.

unit_priceoptional object

Unit price.

valuestring (decimal)

Decimal value of the rate, expressed as the amount of the numerator unit per one denominator unit.

numerator_unit_idstring

ID of the unit for the rate's numerator (e.g. the currency of a price).

denominator_unit_idstring

ID of the unit for the rate's denominator (the per-unit basis).

unit_costoptional object

Unit cost.

valuestring (decimal)

Decimal value of the rate, expressed as the amount of the numerator unit per one denominator unit.

numerator_unit_idstring

ID of the unit for the rate's numerator (e.g. the currency of a price).

denominator_unit_idstring

ID of the unit for the rate's denominator (the per-unit basis).

idstring

Sales order line ID.

objectstringenumValues:sales_order_line

Resource type identifier.

line_item_numberinteger

Position of the line on the order.

Assigned automatically in sequence, starting at 1.

product_skustring

Product SKU.

product_descriptionstringnullable

Product description.

productproductExpandablenullable

Associated product.

idstring

Product ID.

objectstringenumValues:product

Resource type identifier.

typestringenumValues:saleserviceshipping

Product type code, which determines how the product behaves on orders and invoices.

  • sale: a standard sellable product.
  • service: a non-physical service line, such as labor or installation.
  • shipping: a shipping charge applied to an order.
  • credit: a credit applied against an order or invoice.
  • return: a returned product (RMA).
  • tax: a tax line.
portal_visibilitystringenumValues:visiblehidden

Whether the product is shown to buyers in the customer portal.

  • visible: buyers can see and order the product in the portal.
  • hidden: the product is concealed from the portal but remains usable internally.
product_lineproduct_linenullable

The product line this product is assigned to, if any.

Always returned as null in this endpoint.
itemitemnullable

The inventory item backing this product, which holds its SKU, description, pricing, and attributes.

Always returned as null in this endpoint.
created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

quantity_orderedquantityExpandablenullable

Quantity ordered.

idstring

Quantity ID.

objectstringenumValues:quantity

Resource type identifier.

valuestring (decimal)

Raw decimal value of the quantity, as a string to preserve precision.

This is the unformatted machine value; see display_value for the human-readable rendering with unit and thousands separators.

display_valuestring

Formatted value with unit abbreviation (e.g. "$1,234.56" or "100 kg").

unitunitnullable

Unit of measure for this value (e.g. a currency, mass, or count unit).

Always returned as null in this endpoint.
unit_pricerateExpandablenullable

Price charged per unit.

idstring

Rate ID.

objectstringenumValues:rate

Resource type identifier.

valuestring (decimal)

Decimal value of the rate, as a string to preserve precision.

Expressed as the amount of the numerator unit per one denominator unit.

numerator_unitunitnullable

Unit of the rate's numerator (e.g. the currency of a price).

Always returned as null in this endpoint.
denominator_unitunitnullable

Unit of the rate's denominator (the per-unit basis, e.g. kilograms for a price per kilogram).

Always returned as null in this endpoint.
display_valuestring

Human-readable formatted value (e.g. "$25.50 / kg" or "100 kg / hr").

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

unit_costrateExpandablenullable

Internal cost per unit.

Reflects what the business pays for the item, not what the customer is charged, and is used to derive line profitability.

idstring

Rate ID.

objectstringenumValues:rate

Resource type identifier.

valuestring (decimal)

Decimal value of the rate, as a string to preserve precision.

Expressed as the amount of the numerator unit per one denominator unit.

numerator_unitunitnullable

Unit of the rate's numerator (e.g. the currency of a price).

Always returned as null in this endpoint.
denominator_unitunitnullable

Unit of the rate's denominator (the per-unit basis, e.g. kilograms for a price per kilogram).

Always returned as null in this endpoint.
display_valuestring

Human-readable formatted value (e.g. "$25.50 / kg" or "100 kg / hr").

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

totalssales_order_totalsExpandablenullable

Derived monetary totals for this line.

objectstringenumValues:sales_order_totals

Resource type identifier.

orderedstring (decimal)

Total ordered amount as a decimal string (unit price x quantity ordered). This is the baseline the stage completions are measured against.

pickedsales_order_stage_total

Picked amount and completion.

Always returned as null in this endpoint.
packedsales_order_stage_total

Packed amount and completion.

Always returned as null in this endpoint.
invoicedsales_order_stage_total

Invoiced amount and completion.

Always returned as null in this endpoint.
created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

Responses

200

Successful response for Update Sales Order Line