API de las tiendas

Cada tienda ShopKollect expone la misma API pública en JSON. La usa la aplicación ShopKollect; puede usarla para sus propias aplicaciones o integraciones.

Dirección

La dirección de la tienda (subdominio o dominio del comerciante), seguida de /api/v1. Ejemplo:

https://demo.shop.pixelorigin.com/api/v1/products

Idioma

Cabecera Accept-Language (fr, en, es, ar); si no, el idioma de la tienda.

Precios

En céntimos, IVA incluido, con una versión formateada. El servidor siempre vuelve a comprobar precios, stock, horarios y composiciones.

Autenticación

Catálogo y pedido sin cuenta. Cuenta de cliente: token personal «Authorization: Bearer …» obtenido al iniciar sesión, propio de la tienda.

Errores y límites

Errores {"message", "errors"} (422 validación, 401 token, 404, 429 demasiadas solicitudes). Límite por dirección IP.

Discovery and shop

GET /.well-known/shopkollect.json Shop card: name, logo, colours, languages, currency, modules, API base URL.
GET /api/v1/shop Contact details, open / closed state and message, pages (terms, legal notice…).
GET /api/v1/pickup-slots Today's pickup times (HH:MM); "required" tells whether a time must be chosen.

Catalogue

GET /api/v1/categories Visible categories, with the number of products for sale.
GET /api/v1/products Products for sale: prices incl. tax in cents, sale price, images (320 / 640 / 1024 px), stock, "composable". category category id or slugq search (2 characters min.)sort position, new, price_asc, price_desc, name
GET /api/v1/products/{slug} Full product: description, allergens, product page URL.
GET /api/v1/products/{slug}/composition Smart Kiosk journey of the product (pages, options, prices, min / max rules): same definition as the kiosk.

Cart and orders

POST /api/v1/cart/quote The cart lives in the app: the server returns priced lines (compositions included), the total and per-line errors. lines [{product: id or slug, quantity, selection?: {page_id: {option_id: quantity}}}]
POST /api/v1/orders Places the order (pay on site) → number and tracking token. Same checks as the website: opening hours, stock, pickup time. lines [{product: id or slug, quantity, selection?: {page_id: {option_id: quantity}}}]name stringphone stringemail stringnote stringpickup_time HH:MM, from /pickup-slotsaccept terms accepted (required)
GET /api/v1/orders/{number} Tracking: status (new, preparing, ready, collected, cancelled), pickup time, lines. With the tracking token or the customer token. token order tracking token
POST /api/v1/devices Registers a phone (Firebase token) for "order ready" / "cancelled" notifications, linked to the tracked orders. token stringplatform android | ioslocale stringorders [{number, token}]
DELETE /api/v1/devices Unregisters a phone. token string

Customer account (per shop)

POST /api/v1/auth/register Creates the account → personal token (one per device). A customer who already ordered as a guest keeps their history. name stringemail stringphone stringpassword stringnewsletter booleandevice_name string
POST /api/v1/auth/login Login → personal token. 5 attempts per minute. email stringpassword stringdevice_name string
POST /api/v1/auth/password Forgotten password: sends the same e-mail as the website. email string
DELETE /api/v1/auth/token token Logout: revokes the token used.
GET /api/v1/me token Customer profile.
PUT /api/v1/me token Updates name, e-mail, phone, newsletter, language, password.
GET /api/v1/me/orders token Last 50 orders.
GET /api/v1/me/export token Data export (GDPR), JSON.
DELETE /api/v1/me token Deletes the account (confirm=true); orders stay with the shop, unlinked from the customer. confirm boolean