Storefront API
- Authentication
- Account
- Account / Address
- Account / Credit Cards
- Account / Orders
- Order Status
- Cart
- Cart / Line Items
- Cart / Other
- Cart / Coupons
- Checkout
- Checkout / State
- Checkout / Shipments
- Checkout / Payments
- Checkout / Store Credit
- Products
- Stores
- Taxons
- Countries
- CMS Pages
- Menus
- Wishlists
- Wishlists / Wished Items
- Digital Downloads
Platform API
- Authentication
- Addresses
- Adjustments
- Classifications
- CMS Pages
- CMS Sections
- Countries
- Data Feeds
- Digital Links
- Digital Assets
- Line Items
- Menu Items
- Menus
- Option Types
- Option Values
- Orders
- Payment Methods
- Payments
- Products
- Promotion Actions
- Promotion Categories
- Promotion Rules
- Promotions
- Roles
- Shipments
- Shipping Categories
- Shipping Methods
- States
- Stock Items
- Stock Locations
- Store Credit Categories
- Store Credit Types
- Store Credits
- Tax Categories
- Tax Rates
- Taxonomies
- Taxons
- Users
- Variants
- Webhook Events
- Webhook Subscribers
- Wished Items
- Wishlists
- Zones
Update Checkout
The Update Checkout endpoint allows you to manage the typical stages of an e-commerce checkout system.
Order token to authorize Cart and Checkout requests.
Specify the related resources you would like to receive in the response body. More Information.
Street address
Additional address information, floor no etc
City, town
Valid zipcode, will be validated against the selected Country
State/region/province 2 letter abbreviation
Country ISO (2-chars) or ISO3 (3-chars) code. List of all codes
Company name
The internal name for this address (Work, Home)
Street address
Additional address information, floor no etc
City, town
Valid zipcode, will be validated against the selected Country
State/region/province 2 letter abbreviation
Country ISO (2-chars) or ISO3 (3-chars) code. List of all codes
Company name
The internal name for this address (Work, Home)
curl --request PATCH \
--url https://demo.spreecommerce.org/api/v2/storefront/checkout \
--header 'Content-Type: application/vnd.api+json' \
--header 'X-Spree-Order-Token: <api-key>' \
--data '{
"order": {
"email": "[email protected]",
"bill_address_attributes": {
"firstname": "John",
"lastname": "Snow",
"address1": "7735 Old Georgetown Road",
"city": "Bethesda",
"phone": "3014445002",
"zipcode": "20814",
"state_name": "MD",
"country_iso": "US"
},
"ship_address_attributes": {
"firstname": "John",
"lastname": "Snow",
"address1": "7735 Old Georgetown Road",
"city": "Bethesda",
"phone": "3014445002",
"zipcode": "20814",
"state_name": "MD",
"country_iso": "US"
}
}
}'
{
"data": {
"id": "17",
"type": "cart",
"attributes": {
"number": "R233871560",
"item_total": "0.0",
"total": "0.0",
"ship_total": "0.0",
"adjustment_total": "0.0",
"created_at": "2021-09-28T22:15:07.471Z",
"updated_at": "2021-09-28T22:15:07.471Z",
"completed_at": null,
"included_tax_total": "0.0",
"additional_tax_total": "0.0",
"display_additional_tax_total": "$0.00",
"display_included_tax_total": "$0.00",
"tax_total": "0.0",
"currency": "USD",
"state": "cart",
"token": "zTEpsukRq_yEUcXVCSv0uw1632867307450",
"email": null,
"display_item_total": "$0.00",
"display_ship_total": "$0.00",
"display_adjustment_total": "$0.00",
"display_tax_total": "$0.00",
"promo_total": "0.0",
"display_promo_total": "$0.00",
"item_count": 0,
"special_instructions": null,
"display_total": "$0.00",
"pre_tax_item_amount": "0.0",
"display_pre_tax_item_amount": "$0.00",
"pre_tax_total": "0.0",
"display_pre_tax_total": "$0.00",
"shipment_state": null,
"payment_state": null
},
"relationships": {
"line_items": {
"data": []
},
"variants": {
"data": []
},
"promotions": {
"data": []
},
"payments": {
"data": []
},
"shipments": {
"data": []
},
"user": {
"data": null
},
"billing_address": {
"data": null
},
"shipping_address": {
"data": null
}
}
}
}
Authorizations
Order token to authorize Cart and Checkout requests.
Query Parameters
Specify the related resources you would like to receive in the response body. More Information.
Body
Street address
City, town
Country ISO (2-chars) or ISO3 (3-chars) code. List of all codes
Additional address information, floor no etc
Valid zipcode, will be validated against the selected Country
State/region/province 2 letter abbreviation
Company name
The internal name for this address (Work, Home)
Street address
City, town
Country ISO (2-chars) or ISO3 (3-chars) code. List of all codes
Additional address information, floor no etc
Valid zipcode, will be validated against the selected Country
State/region/province 2 letter abbreviation
Company name
The internal name for this address (Work, Home)
The id
of the Payment Method
Response
The Cart provides a central place to collect information about an order, including line items, adjustments, payments, addresses, and shipments. Read more in Spree docs
Used as the {order_number} value in the URI to identify a completed order.
Used for authorizing actions through the X-Spree-Order-Token
API Key.
State of the Cart in the Checkout flow. Please see <a href="/developer/core-concepts/orders#the-order-state-machine"> The Order State machine </a> for a full list with description.
cart
, address
, delivery
, payment
, confirm
, complete
Total quantity number of all items added to the Cart
x > 0
Message added by the Customer
Overall state of the Shipments. Please see <a href="/developer/core-concepts/orders#order-shipment-states-1"> Order Shipments states </a> for a full list with description.
pending
, backorder
, canceled
, partial
, ready
, shipped
Overall state of the Payments. Please see <a href="/developer/core-concepts/orders#order-payment-states"> Order Payments states </a> for a full list with description.
balance_due
, credit_owed
, failed
, paid
, void
Price of Product per quantity
Price of Product per quantity
Total price of Line Item including adjastments, promotions and taxes
Total price of Line Item including adjastments, promotions and taxes
TBD
TBD
Taxes included in the price, eg. VAT
The public metadata for the Line Item.
Was this page helpful?
curl --request PATCH \
--url https://demo.spreecommerce.org/api/v2/storefront/checkout \
--header 'Content-Type: application/vnd.api+json' \
--header 'X-Spree-Order-Token: <api-key>' \
--data '{
"order": {
"email": "[email protected]",
"bill_address_attributes": {
"firstname": "John",
"lastname": "Snow",
"address1": "7735 Old Georgetown Road",
"city": "Bethesda",
"phone": "3014445002",
"zipcode": "20814",
"state_name": "MD",
"country_iso": "US"
},
"ship_address_attributes": {
"firstname": "John",
"lastname": "Snow",
"address1": "7735 Old Georgetown Road",
"city": "Bethesda",
"phone": "3014445002",
"zipcode": "20814",
"state_name": "MD",
"country_iso": "US"
}
}
}'
{
"data": {
"id": "17",
"type": "cart",
"attributes": {
"number": "R233871560",
"item_total": "0.0",
"total": "0.0",
"ship_total": "0.0",
"adjustment_total": "0.0",
"created_at": "2021-09-28T22:15:07.471Z",
"updated_at": "2021-09-28T22:15:07.471Z",
"completed_at": null,
"included_tax_total": "0.0",
"additional_tax_total": "0.0",
"display_additional_tax_total": "$0.00",
"display_included_tax_total": "$0.00",
"tax_total": "0.0",
"currency": "USD",
"state": "cart",
"token": "zTEpsukRq_yEUcXVCSv0uw1632867307450",
"email": null,
"display_item_total": "$0.00",
"display_ship_total": "$0.00",
"display_adjustment_total": "$0.00",
"display_tax_total": "$0.00",
"promo_total": "0.0",
"display_promo_total": "$0.00",
"item_count": 0,
"special_instructions": null,
"display_total": "$0.00",
"pre_tax_item_amount": "0.0",
"display_pre_tax_item_amount": "$0.00",
"pre_tax_total": "0.0",
"display_pre_tax_total": "$0.00",
"shipment_state": null,
"payment_state": null
},
"relationships": {
"line_items": {
"data": []
},
"variants": {
"data": []
},
"promotions": {
"data": []
},
"payments": {
"data": []
},
"shipments": {
"data": []
},
"user": {
"data": null
},
"billing_address": {
"data": null
},
"shipping_address": {
"data": null
}
}
}
}