Checkout
Prepare a cart and get a link to it
Secret or publishable key. Permission checkout:write. Send the shopper to url: the cart opens with those lines; prices, stock, payment methods and every checkout guard are SitesPlaced's own. Up to 50 lines. Unknown or archived products give 422. With a publishable key, return_url must be on the key's allowed websites. The link works for 24 hours.
post/checkout/sessions
Request
- Base URL: https://sitesplaced.com/api/v1
- URL: https://sitesplaced.com/api/v1/checkout/sessions
- Auth: one of:
- HTTP bearer
- API key in header X-Api-Key
Request body
Example request
{
"items": [
{
"variant": {
"Size": "M"
}
}
]
}Response
The prepared cart.
Example response
{
"url": "https://asha-jewels.sitesplaced.site/cart?restore=cl_…",
"token": "cl_…"
}Changes
No recorded changes to this operation across all 1 revision of this API.