Use the JSON checkout API
Create a buyer session, add an item, get a quote, and place an order against the version 1 API.
Start a session and cart#
Use /api/sellissimo/v1 as the base path and send Accept: application/json. In a same-origin browser session, use this example to start a guest cart. Run it on your own development store with the quickstart product available.
const api = '/api/sellissimo/v1';
const session = await fetch(api + '/session', {
headers: { Accept: 'application/json' }
}).then(response => response.json());
const headers = {
Accept: 'application/json',
'Content-Type': 'application/json',
'X-CSRF-TOKEN': session.csrf_token
};
const cart = await fetch(api + '/carts', {
method: 'POST', headers, body: JSON.stringify({ site: 'default' })
}).then(response => response.json());
if (cart.token) headers.Authorization = 'Bearer ' + cart.token;
await fetch(api + '/carts/' + cart.id + '/items', {
method: 'PUT', headers,
body: JSON.stringify({ sku: 'NOTE-FIELD', quantity: 1 })
});
Retain the session cookies. Guest cart reads and writes require the private cart token. A signed-in account cart uses the authenticated session and returns a null token. For server-rendered clients, maintain a separate cookie jar per buyer.
Quote, review, then check out#
POST to /carts/{id}/quote with the contact and address details. Use a returned shipping option for physical items. Requote after the buyer chooses a service and display the calculated total. This example matches the quickstart configuration:
{
"email": "reader@example.test",
"address": {
"name": "Alex Reed", "street": "10 Elm St", "city": "Boston",
"region": "MA", "postal_code": "02108", "country": "US"
},
"shipping": "flat_rate.standard",
"gateway": "pay_on_delivery"
}
Check stock_shortages, missing_billing_fields, missing_shipping_fields, and delivery_ready. POST the reviewed values to /carts/{id}/checkout with the returned quote_token. Follow the returned checkout or receipt URL. Only a confirmed provider outcome settles an online payment.
Look up products and orders#
GET /catalogacceptssite,q,category,pageandper_page(1–100). Followpagination.next_page_url. UseGET /catalog/{sku}for product details and variant choices.PUT /carts/{id}/itemstakes an absolute quantity (0–999). Passline_keyfor existing personalized lines. Send buyer personalization inoptionsand additional blueprint fields inline_fieldsororder_fields.- Use the returned signed receipt URL or the owning session for
GET /orders/{id}. Download links on the receipt reflect current entitlement. GET /account/ordersreturns the signed-in buyer's paginated history.GET /account/addressesreturns saved addresses and a revision for updates.
An unavailable resource returns 404. Invalid input or ineligible discounts return 422. A 409 can mean changed stock, a changed quote, or a cart already used at checkout. Show current values for review before retrying. Keep monetary integers in currency minor units throughout.