API ReferenceCarts
Carts Update
Update an existing cart.
Authorization
oauth2 carts:writeAuthorizationBearer <token>
Generate an Access Token through Settings > API Access for single store access or use the Authorization Code flow with your partner App Client ID. Use required permission scopes for API endpoint access. Example Authorization: Bearer 123
In: header
Scope: carts:write
Path Parameters
id*integer
A unique integer value identifying this Cart.
Header Parameters
X-29next-API-Version*"2024-04-01"
Default
"2024-04-01"Value in
- "2024-04-01"
Response Body
application/json
curl -X PUT "https://example.com/carts/0/" \ -H "X-29next-API-Version: 2024-04-01" \ -H "Content-Type: application/json" \ -d '{ "lines": [ { "product_id": 0, "quantity": 1 } ] }'{ "abandoned": true, "attribution": { "affiliate": "string", "agent": { "email": "user@example.com", "first_name": "string", "id": 0, "last_name": "string" }, "funnel": "string", "gclid": "string", "metadata": null, "subaffiliate1": "string", "subaffiliate2": "string", "subaffiliate3": "string", "subaffiliate4": "string", "subaffiliate5": "string", "utm_campaign": "string", "utm_content": "string", "utm_medium": "string", "utm_source": "string", "utm_term": "string" }, "checkout_url": "http://example.com", "created_at": "2019-08-24T14:15:22Z", "currency": "string", "id": 0, "lines": [ { "currency": "str", "id": 0, "interval": "string", "interval_count": 0, "is_upsell": false, "metadata": null, "price_excl_tax": "string", "price_incl_tax": "string", "product_id": 0, "product_image": "http://example.com", "product_title": "string", "product_url": "http://example.com", "properties": [ { "key": "string", "value": null } ], "quantity": 0, "report_values": { "currency": "str", "price_excl_tax": "string", "price_incl_tax": "string", "total_cost": "string", "total_discount": "string", "unit_cost": "string" }, "sku": "string", "total_cost": "string", "total_discount": "string", "unit_cost": "string", "variant_id": 0, "variant_title": "string" } ], "metadata": null, "report_values": { "currency": "string", "total_cost": "string", "total_discount": "string", "total_excl_tax": "string", "total_incl_tax": "string" }, "status": "string", "total_cost": "string", "total_discount": "string", "total_excl_tax": "string", "total_incl_tax": "string", "user": { "accepts_marketing": true, "email": "user@example.com", "first_name": "string", "id": 0, "ip": "string", "language": "string", "last_name": "string", "phone_number": "string", "user_agent": "string" }, "voucher_discounts": [ { "amount": "string", "description": "string", "name": "string", "voucher": { "code": "string", "end_datetime": "2019-08-24T14:15:22Z", "name": "string", "start_datetime": "2019-08-24T14:15:22Z" } } ]}