API Reference
Explore our comprehensive API documentation. Learn how to authenticate, make requests, and leverage our endpoints to build powerful e-commerce experiences.
API Basics
Authentication
The API uses an auth token to recognize customers. The following endpoints can issue tokens:
POST /loginPOST /registerPOST /addToCart
When a token is issued, it will be set as a cookie named token and also returned as a root level property on the JSON response.
The auth token can be submitted with requests in two ways:
- As a cookie (automatic if your environment allows cookies)
- As a bearer token in the
Authorizationheader
To clear the token cookie, call POST /logout. If no valid auth token is presented but required, the API responds with 401. Tokens expire after one week.
Project & Country
All endpoints require the following path parameters:
project- Your project key (e.g.finecollections)country- ISO 3166-1 alpha-2 country code (e.g.DEfor Germany)
Language
The API determines the client's language from the Accept-Language header by default. To override this, use the lang query parameter on relevant endpoints.
Endpoints
Products
Get Products
/:project/:country/getProductsqFull text search term (optional)filtersFilters (optional)sortSort by attribute (optional)fromPagination offset (optional)sizeNumber of results (optional)
Filters format: categories:tShirts|size:M|colors:blue,white
Sort format: price:desc or just price
Get Product
/:project/:country/getProductidProduct ID (optional)skuSKU / Variant ID (optional)
Either id or sku must be specified.
Customer / Authentication
Get Customer
/:project/:country/getCustomerRegister
/:project/:country/registersalutationtitle(optional)givenNamefamilyNameemailpassword
If a valid auth token of an anonymous customer is presented, the customer is upgraded to a registered customer.
Login
/:project/:country/loginemailpassword
If an anonymous customer's cart exists, it will be merged with the registered customer's cart.
Logout
/:project/:country/logoutClears the token cookie.
Set Customer Details
/:project/:country/setCustomerDetailssalutation(optional)title(optional)givenName(optional)familyName(optional)birthDate(optional)phoneNumber(optional)isSubscribedToNewsletter(optional)preferredLanguage(optional)
Cart
Add To Cart
/:project/:country/addToCartskuquantity(optional)
If quantity is not provided, one instance is added. Creates an anonymous customer if no auth token is present.
Set Cart Item Quantity
/:project/:country/setCartItemQuantityskuquantity
Remove From Cart
/:project/:country/removeFromCartsku
Logistics / Shipping
Set Shipping Address
/:project/:country/setShippingAddresscountrysalutationtitle(optional)givenNamefamilyNamestreetAddresssupplement(optional)postalCodecityregion(optional)phoneNumber(optional)
Set Shipping Method
/:project/:country/setShippingMethodtypeKeye.g. standard, express, clickAndCollectcarrierKeye.g. dhl, hermes (optional)
Payment
Set Billing Address
/:project/:country/setBillingAddresscountrysalutationtitle(optional)givenNamefamilyNamestreetAddresssupplement(optional)postalCodecityregion(optional)phoneNumber(optional)
Set Payment Method
/:project/:country/setPaymentMethodkeyPayment Method KeydataPayment Data (optional)
Orders
Get Orders
/:project/:country/getOrdersGet Order
/:project/:country/getOrderidOrder ID
Place Order
/:project/:country/placeOrderdataPayment Data (optional)
Requires shipping and billing addresses to be set and at least one item in the cart.