Skip to main content
PATCH
/
v1
/
line_items
/
{id}
Update
curl --request PATCH \
  --url https://{defaultHost}/v1/line_items/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "line_item": {
    "quantity": 2
  }
}
'
{
  "id": "82a80f8a-1c5e-4345-8293-30c1c996e90e",
  "object": "line_item",
  "ad_hoc_amount": null,
  "discount_amount": 0,
  "fees_amount": 0,
  "full_amount": 5800,
  "fulfilled_quantity": 0,
  "locked": false,
  "note": null,
  "purchasable_status": "purchasable",
  "quantity": 2,
  "g_weight": 0,
  "unit_g_weight": 0,
  "scratch_amount": 5800,
  "stock_held": false,
  "subtotal_amount": 5800,
  "tax_amount": 0,
  "tax_rate": 0,
  "total_amount": 5800,
  "total_savings_amount": 0,
  "trial": false,
  "trial_amount": 0,
  "variant_options": null,
  "variant_option_names": null,
  "bump": null,
  "checkout": "477b385c-0697-4e1d-bd0b-90808c989357",
  "price": "15c4f9d1-e911-41b5-a863-d937e4539caa",
  "upsell": null,
  "variant": null,
  "swap": null,
  "created_at": 1767909719,
  "updated_at": 1767909719
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Query Parameters

consolidate
boolean

If true then existing line_items for the same price will be consolidated into this line item. (Ad hoc line items will not be consolidated.)

Body

application/json
line_item
object

Response

200 - application/json

Success

id
string | null

The UUID of the specific object.

object
string

A string describing the object type returned.

ad_hoc_amount
integer | null

The amount to use for this line item when the associated price is ad_hoc=true.

quantity
integer

The quantity of products being purchased.

note
string | null

A custom note for this line item. Useful for adding context or special instructions related to the product or purchase.

bump

Expandable – The associated bump ID.

checkout

Expandable – The associated checkout ID.

checkout_fees_amount
integer

The total amount of checkout fees applied to this line item.

discount_amount
integer

Total discount amount applied to this line item.

fees

Expandable – Property not returned unless expanded.

fees_amount
integer

The total amount of fees applied to this line item.

full_amount
integer

The full amount to be charged across all periods.

fulfilled_quantity
integer

The quantity of products that have been fulfilled.

g_weight
number

Total weight of all items (quantity * unit_g_weight) in grams.

locked
boolean

Whether or not this line item is locked. If locked, it cannot be edited or deleted. Line items are locked when an invoice is opened.

price

Expandable – The associated price ID.

unit_g_weight
number

Total weight of the product in grams.

purchasable_status
string

The status indicating if this line item can be purchased (finalized with) or not and why. Possible values are price_gone, price_old_version, variant_mising, variant_gone, variant_old_version, out_of_stock, exceeds_purchase_limit, or purchasable.

scratch_amount
integer

The amount in cents that should be shown as the original amount before any price reductions, also known as the pre-sale price.

stock_held
boolean

Whether or not stock is being held for this line item. (This only applies to the quantity that has not been fulfilled.)

subtotal_amount
integer

Total before any discounts or taxes are applied.

swap

Expandable – The associated swap ID.

tax_amount
integer

Total tax amount.

tax_rate
number

The tax rate for this line item.

total_amount
integer

Total after discounts and taxes are applied.

total_savings_amount
integer

The total amount in cents that was saved on this line item taking into account all negative fees, discounts, and all price scratch_amount values.

trial
boolean

Set to true if this line item is for a price that has a trial.

trial_amount
integer

The total amount in cents that is removed from this line item due to a trial period.

upsell

Expandable – The associated upsell ID.

variant

Expandable – The associated variant ID.

variant_options
array | null

An array of the associated variant's options.

variant_option_names
array | null

An array of the associated product's variant option names.

created_at
integer | null

Time at which the object was created. Measured in seconds since the Unix epoch.

updated_at
integer | null

Time at which the object was last updated. Measured in seconds since the Unix epoch.