Update a line item
Changed onUpdate a line item
Request
- Base URLhttps://{your_organization_slug}.commercelayer.io/api
- URLhttps://{your_organization_slug}.commercelayer.io/api/line_items/{lineItemId}
- AuthHTTP bearer
Path parameters
The resource's id
Request body
Example request
{
"data": {
"id": "XAyRWNUzyN",
"attributes": {
"sku_code": "TSHIRTMM000000FFFFFFXLXX",
"bundle_code": "BUNDLEMM000000FFFFFFXLXX",
"quantity": 4,
"_external_price": true,
"_reserve_stock": true,
"_reset_restocked_quantity": true,
"unit_amount_cents": 10000,
"compare_at_amount_cents": 13000,
"options_amount_cents": 1000,
"name": "Men's Black T-shirt with White Logo (XL)",
"image_url": "https://img.yourdomain.com/skus/xYZkjABcde.png",
"frequency": "monthly",
"_reset_circuit": true,
"reference": "ANY-EXTERNAL-REFEFERNCE",
"reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
"metadata": {
"foo": "bar"
}
},
"relationships": {
"tags": {
"data": {
"id": "XAyRWNUzyN"
}
}
}
}
}Response
The updated line item object
Changes
- info
added the optional property
//to the response with the status
- info
- breaking
request property
/was restricted to a list of enum values - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the
request property default valueline_itemswas removed - info
added the new
line_itemsenum value to the request property/ - info
added the media type
application/vnd.api+jsonfor the response with the status
- breaking