# API-ul magazinului Cu API-ul magazinului, site-ul de comenzi al unui restaurant citește meniul, cere prețul coșului, plasează comanda și deschide contul clientului. Site-ul poate fi scris în orice limbaj și orice framework, sau poate fi o aplicație mobilă cu server propriu. - Adresa: `https://api.edin.ro` - Referința completă: [referinta.html](referinta.html) - Documentul OpenAPI 3.1: [openapi.json](openapi.json) - Pentru asistenți AI: [llms.txt](llms.txt), [llms-full.txt](llms-full.txt) și skill-ul [SKILL.md](SKILL.md) ## Cheia magazinului Fiecare cerere are cheia magazinului în antetul `Authorization`: ```http GET /storefront/locations HTTP/1.1 Host: api.edin.ro Authorization: Bearer ``` Cheia o creează firma în Operations Hub, la **Setări → Chei pentru site**, după ce Edin îi permite să emită chei. Cheia se vede întreagă o singură dată, la creare. Firma și punctele de lucru ale comenzii se stabilesc după cheie: un identificator de firmă trimis în cerere este ignorat. **Cheia se păstrează numai pe serverul site-ului.** Nu o pune în codul care rulează în browser și nu o trimite vizitatorului. Browserul trimite cererile la serverul site-ului, iar serverul site-ului apelează API-ul. O cerere cu antetul `Origin` (din browser) este acceptată numai de pe domeniile configurate pentru cheie. **Trimite IP-ul vizitatorului** în `X-Forwarded-For`. Limitele de cereri se aplică pe cheie și pe acest IP. Fără acest antet, toți vizitatorii site-ului împart aceeași limită. ## Comanda, pas cu pas 1. **Punctele de lucru.** `GET /storefront/locations` întoarce punctele de lucru la care are acces cheia, cu programul, ridicarea din local (`pickup`), comenzile programate (`scheduling`) și metodele de plată (`paymentMethods`). `id`-ul unui punct de lucru este `locationId` în pașii următori. 2. **Meniul.** `GET /storefront/menu?location=` întoarce categoriile, produsele, opțiunile, meniurile combo și promoțiile automate. Un produs cu `available: false` nu se poate comanda acum, iar `unavailableReason` spune de ce. 3. **Intervalele, pentru o comandă programată.** `GET /storefront/slots?location=` întoarce zilele și intervalele de 15 minute. Începutul unui interval liber se trimite în `scheduledFor`. Fără `scheduledFor`, comanda se pregătește cât mai curând. 4. **Adresa.** `POST /storefront/address-check` spune dacă adresa este într-o zonă de livrare (`delivers`), în afara zonelor (`outside_zones`) sau negăsită pe hartă (`not_found`). La `delivers`, răspunsul are punctul pe hartă (`point`), taxa de livrare și comanda minimă. Păstrează `point` pentru pașii următori. 5. **Prețul coșului.** `POST /storefront/quote` primește liniile coșului, fără prețuri, și întoarce prețul fiecărei linii, reducerile, taxa de livrare, TVA-ul și totalul. Dacă `orderable` este `false`, `refusals` spune de ce nu se poate plasa comanda (`closed`, `below_minimum`, `outside_zones`, `address_required` și celelalte), iar o linie cu `problem` nu se adună la total. 6. **Comanda.** `POST /storefront/orders` plasează comanda. Alege o `idempotencyKey` o dată pe coș și trimite-o la fiecare încercare: o cerere cu aceeași cheie primește aceeași comandă, deci o reîncercare după o eroare de rețea nu creează o a doua comandă. Răspunsul are comanda, `accessToken` și, la plata online, `paymentUrl`, unde trimiți clientul să plătească. 7. **Pagina comenzii.** `GET /storefront/orders/{id}?token=` întoarce starea comenzii. Pune `accessToken` în linkul paginii comenzii, ca clientul să o poată deschide fără cont. O comandă programată se poate anula cu `POST /storefront/orders/{id}/cancel`, până la ora limită. Comanda trece prin stările din `status`: `awaiting_payment` (așteaptă plata online), `awaiting_dispatch` (așteaptă acceptarea), `scheduled` (programată), `sent_to_kitchen` (acceptată și trimisă la bucătărie), `rejected` (respinsă de restaurant), `expired` (neplătită la timp) și `cancelled` (anulată). ### Prețul îl calculează serverul Site-ul nu calculează prețuri, reduceri sau TVA. Afișează sumele din `quote`, iar la plasare serverul calculează din nou prețul și ignoră orice sumă din cerere. Dacă între `quote` și plasare s-a schimbat ceva (un produs s-a terminat, un cod de reducere a expirat), cererea de plasare primește `409`, cu motivul în `error.details.reason` și prețul actual în `error.details.quote`. Arată clientului noul preț și lasă-l să confirme din nou. ## Contul clientului Clientul intră în cont cu un cod primit prin SMS sau prin e-mail: 1. `POST /storefront/account/code` trimite codul prin SMS (`channel`: `phone`) sau prin e-mail (`channel`: `email`), la numărul sau adresa din `destination`. 2. `POST /storefront/account/code/verify` verifică codul și întoarce sesiunea: `token`, `expiresAt` și contul. Sau cu o platformă: `GET /storefront/auth/providers` întoarce platformele activate de firmă, iar `POST /storefront/auth/{provider}` verifică tokenul primit de la platformă și deschide sesiunea clientului. Trimite `token` în antetul `X-Storefront-Session`, împreună cu cheia magazinului, la rutele contului (`/storefront/account/...`). Păstrează-l pe serverul site-ului, de exemplu într-un cookie `HttpOnly`. La `quote` și la plasarea comenzii, sesiunea este opțională. Cu sesiune, comanda se salvează în contul clientului și primește prețurile grupului lui. Dacă sesiunea a expirat sau a fost închisă, răspunsul este `401`, cu `error.code` `STOREFRONT_SESSION_INVALID`. Scoate atunci clientul din cont. ## Banii O sumă este un obiect cu valoarea zecimală, ca text, și moneda: ```json { "amount": "58.50", "currency": "RON" } ``` Valoarea are mereu două zecimale. Prețurile din meniu sunt cu TVA inclus. Afișează sumele așa cum vin și nu face calcule cu ele pe site: totalul, TVA-ul și reducerile le calculează serverul, în `quote`. În cereri (de exemplu `productsTotal` la `address-check`), o sumă se trimite ca text, cu cel mult două zecimale: `"58.50"`. ## Erorile Un răspuns de eroare are forma: ```json { "success": false, "error": { "statusCode": 409, "code": "STOREFRONT_ORDER_REFUSED", "message": "The order cannot be placed", "error": "Conflict", "details": { "code": "STOREFRONT_ORDER_REFUSED", "reason": "not_orderable", "quote": { "…": "…" } }, "timestamp": "2026-11-20T12:00:00.000Z", "path": "/storefront/orders", "requestId": "…" } } ``` `error.code` este stabil și se citește de program. `error.message` este pentru dezvoltator, în engleză. `error.details` are ce ține de eroare: câmpurile greșite în `fieldErrors` (la `400`, `INVALID_PAYLOAD`), motivul în `reason` și prețul actual în `quote` (la `409`, `STOREFRONT_ORDER_REFUSED`). Trimite `error.requestId` când ceri ajutor pentru o eroare. | Cod HTTP | Când | |---|---| | `400` | Cererea nu respectă schema (câmp lipsă, valoare în afara limitelor). | | `401` | Cheia lipsește sau nu este validă (`STOREFRONT_KEY_INVALID`). Sesiunea clientului lipsește sau a expirat (`STOREFRONT_SESSION_INVALID`). | | `404` | Punctul de lucru nu este al cheii, comanda nu există sau linkul comenzii nu este valid. | | `409` | Comanda nu se poate plasa așa cum este (vezi `reason`) sau `idempotencyKey` a fost folosită pentru alt coș. | | `429` | Prea multe cereri. Reîncearcă după numărul de secunde din `Retry-After`. | ## Limitele | Ce se numără | Limita | |---|---| | Cererile unei chei | 1200 pe minut | | Cererile unui vizitator (IP din `X-Forwarded-For`) | 120 pe minut | | Codurile de intrare în cont cerute de un vizitator | 10 la 15 minute | | Codurile încercate de un vizitator | 30 la 15 minute | | Firmele căutate după CUI de un vizitator | 20 pe minut | ## Versiunea Versiunea API-ului este în `info.version` din [openapi.json](openapi.json). Rutele nu au prefix de versiune. API-ul se schimbă numai prin adăugare: - Câmpuri noi în răspunsuri. Clientul trebuie să ignore câmpurile pe care nu le cunoaște. - Câmpuri opționale noi în cereri și rute noi. - Valori noi numai în enumurile marcate `x-extensible-enum`. Un câmp sau o rută care se retrage rămâne funcțională și este marcată `deprecated`. ## Tipurile pentru TypeScript Tipurile TypeScript pentru codul site-ului se generează din documentul OpenAPI: ```bash npx openapi-typescript https:///openapi.json -o edin-storefront.ts ``` ## Referința Edin: API-ul magazinului, versiunea 1.0.0. Schemele sunt la sfârșit, după nume. ### GET /storefront/locations **Punctele de lucru ale magazinului** Punctele de lucru la care are acces cheia, cu programul și modurile de comandă. Este primul pas al oricărei comenzi: `id`-ul de aici este `locationId` în cererile următoare. Autentificare: cheia magazinului. Răspuns: - `2XX`: `StorefrontLocationsResponseOutput` ### GET /storefront/menu **Meniul unui punct de lucru** Categoriile, produsele cu opțiunile lor, meniurile combo și promoțiile automate, la ora cererii. Prețurile sunt cu TVA inclus, ca sumă zecimală cu monedă (`"25.00"`, `RON`). Autentificare: cheia magazinului. Parametri: - `location` (query, obligatoriu) Răspuns: - `2XX`: `StorefrontMenuResponseOutput` ### GET /storefront/slots **Intervalele comenzii programate** Zilele și intervalele de 15 minute în care se poate programa o comandă. Intervalele pline sunt marcate. Începutul unui interval se trimite în `scheduledFor`. Autentificare: cheia magazinului. Parametri: - `location` (query, obligatoriu) Răspuns: - `2XX`: `StorefrontSlotsResponse` ### POST /storefront/address-check **Verifică adresa de livrare** Spune dacă adresa este într-o zonă de livrare (`delivers`), în afara zonelor (`outside_zones`) sau negăsită (`not_found`), cu punctul de lucru care livrează și condițiile livrării. Autentificare: cheia magazinului. Corpul cererii: `StorefrontAddressCheckRequest`. Răspuns: - `2XX`: `StorefrontAddressCheckResponse` ### GET /storefront/company **Caută firma după CUI** Datele firmei de la ANAF, pentru factura pe firmă. Răspunde mereu 200, cu rezultatul în `status`: firma găsită, CUI greșit, firmă necunoscută sau ANAF indisponibil. Autentificare: cheia magazinului. Parametri: - `vatId` (query, obligatoriu) Răspuns: - `2XX`: `StorefrontCompanyLookupResponseOutput` ### POST /storefront/quote **Prețul coșului** Serverul calculează prețul liniilor, reducerile, taxa de livrare și TVA-ul. Un preț trimis în cerere este ignorat. Afișează totalurile din acest răspuns, nu le calcula pe site. Autentificare: cheia magazinului; sesiunea clientului (`X-Storefront-Session`) este opțională. Corpul cererii: `StorefrontQuoteRequest`. Răspuns: - `2XX`: `StorefrontQuoteResponseOutput` ### POST /storefront/orders **Plasează comanda** Serverul calculează din nou prețul și nu folosește nicio sumă din cerere. O cerere cu aceeași `idempotencyKey` primește aceeași comandă. Dacă coșul nu se poate comanda, răspunsul este 409, cu motivul în `reason` și prețul actual în `quote`. La plata online, trimite clientul la `paymentUrl`. Autentificare: cheia magazinului; sesiunea clientului (`X-Storefront-Session`) este opțională. Corpul cererii: `StorefrontPlaceOrderRequest`. Răspuns: - `2XX`: `StorefrontPlaceOrderResponseOutput` ### GET /storefront/orders/{id} **Pagina comenzii** Starea comenzii, liniile și totalurile. `token` este `accessToken` din răspunsul la plasarea comenzii. Autentificare: cheia magazinului. Parametri: - `id` (path, obligatoriu) - `token` (query, obligatoriu) Răspuns: - `2XX`: `StorefrontOrderOutput` ### POST /storefront/orders/{id}/cancel **Anulează comanda programată** Clientul anulează comanda programată din pagina comenzii, până la ora limită. Dacă comanda nu se mai poate anula, răspunsul este 409. Autentificare: cheia magazinului. Parametri: - `id` (path, obligatoriu) Corpul cererii: `StorefrontCancelOrderRequest`. Răspuns: - `2XX`: `StorefrontOrderOutput` ### GET /storefront/account **Contul clientului** Autentificare: cheia magazinului și sesiunea clientului (`X-Storefront-Session`). Răspuns: - `2XX`: `CustomerAccount` ### PATCH /storefront/account **Schimbă numele clientului** Autentificare: cheia magazinului și sesiunea clientului (`X-Storefront-Session`). Corpul cererii: `UpdateCustomerAccountRequest`. Răspuns: - `2XX`: `CustomerAccount` ### DELETE /storefront/account **Șterge contul** Datele personale ale clientului se anonimizează. Comenzile se păstrează, fără datele personale. Autentificare: cheia magazinului și sesiunea clientului (`X-Storefront-Session`). Corpul cererii: `DeleteCustomerAccountRequest`. Răspuns: - `2XX`: Cererea a reușit, fără corp. ### GET /storefront/account/addresses **Adresele clientului** Autentificare: cheia magazinului și sesiunea clientului (`X-Storefront-Session`). Răspuns: - `2XX`: `CustomerAddressListResponseOutput` ### POST /storefront/account/addresses **Adaugă o adresă** Autentificare: cheia magazinului și sesiunea clientului (`X-Storefront-Session`). Corpul cererii: `SaveCustomerAddressRequest`. Răspuns: - `2XX`: `CustomerAddressOutput` ### PUT /storefront/account/addresses/{addressId} **Modifică o adresă** Autentificare: cheia magazinului și sesiunea clientului (`X-Storefront-Session`). Parametri: - `addressId` (path, obligatoriu) Corpul cererii: `SaveCustomerAddressRequest`. Răspuns: - `2XX`: `CustomerAddressOutput` ### DELETE /storefront/account/addresses/{addressId} **Șterge o adresă** Autentificare: cheia magazinului și sesiunea clientului (`X-Storefront-Session`). Parametri: - `addressId` (path, obligatoriu) Răspuns: - `2XX`: Cererea a reușit, fără corp. ### PUT /storefront/account/billing **Salvează datele de facturare** Autentificare: cheia magazinului și sesiunea clientului (`X-Storefront-Session`). Corpul cererii: `SaveCustomerBillingProfileRequest`. Răspuns: - `2XX`: `CustomerAccount` ### DELETE /storefront/account/billing **Șterge datele de facturare** Autentificare: cheia magazinului și sesiunea clientului (`X-Storefront-Session`). Răspuns: - `2XX`: `CustomerAccount` ### POST /storefront/account/code **Trimite codul de intrare în cont** Trimite un cod de șase cifre prin SMS sau prin e-mail, la destinația din cerere. Răspunsul este 202. Autentificare: cheia magazinului. Corpul cererii: `CustomerCodeRequest`. Răspuns: - `2XX`: `CustomerCodeSent` ### POST /storefront/account/code/verify **Intră în cont cu codul** Verifică codul primit și deschide sesiunea clientului. `token` din răspuns se trimite în antetul `X-Storefront-Session` la rutele contului. Autentificare: cheia magazinului. Corpul cererii: `CustomerCodeVerifyRequest`. Răspuns: - `2XX`: `StorefrontSession` ### POST /storefront/account/contact/code **Trimite codul pentru noul telefon sau e-mail** Autentificare: cheia magazinului și sesiunea clientului (`X-Storefront-Session`). Corpul cererii: `CustomerCodeRequest`. Răspuns: - `2XX`: `CustomerCodeSent` ### POST /storefront/account/contact/verify **Confirmă noul telefon sau e-mail** Autentificare: cheia magazinului și sesiunea clientului (`X-Storefront-Session`). Corpul cererii: `CustomerCodeVerifyRequest`. Răspuns: - `2XX`: `CustomerAccount` ### PUT /storefront/account/marketing **Acordul pentru mesajele de marketing** Autentificare: cheia magazinului și sesiunea clientului (`X-Storefront-Session`). Corpul cererii: `CustomerMarketingConsentRequest`. Răspuns: - `2XX`: `CustomerAccount` ### GET /storefront/account/orders **Comenzile clientului** Istoricul comenzilor plasate din cont, pe pagini. Autentificare: cheia magazinului și sesiunea clientului (`X-Storefront-Session`). Parametri: - `limit` (query) - `offset` (query) Răspuns: - `2XX`: `StorefrontAccountOrdersResponseOutput` ### POST /storefront/account/orders/{orderId}/reorder **Comandă din nou** Liniile unei comenzi vechi, la prețurile de azi. O linie care nu se mai poate comanda are `problem` și nu se pune în coș. Autentificare: cheia magazinului și sesiunea clientului (`X-Storefront-Session`). Parametri: - `orderId` (path, obligatoriu) Corpul cererii: `StorefrontReorderRequest`. Răspuns: - `2XX`: `StorefrontReorderResponseOutput` ### POST /storefront/account/sign-out **Ieși din cont** Închide sesiunea din antetul `X-Storefront-Session`. Autentificare: cheia magazinului și sesiunea clientului (`X-Storefront-Session`). Răspuns: - `2XX`: Cererea a reușit, fără corp. ### POST /storefront/auth/{provider} **Intră în cont cu o platformă** Verifică tokenul primit de la platformă și deschide sesiunea clientului. Autentificare: cheia magazinului. Parametri: - `provider` (path, obligatoriu) Corpul cererii: `StorefrontAuthExchangeRequest`. Răspuns: - `2XX`: `StorefrontSession` ### GET /storefront/auth/providers **Platformele de intrare în cont** Platformele activate de firmă (Google, Apple, Facebook), cu identificatorul public necesar butonului de intrare. Autentificare: cheia magazinului. Răspuns: - `2XX`: `StorefrontAuthProvidersResponse` ### POST /storefront/gift-cards **Cumpără un card cadou** Autentificare: cheia magazinului. Corpul cererii: `StorefrontGiftCardPurchaseRequest`. Răspuns: - `2XX`: `StorefrontGiftCardPurchaseResponse` ### GET /storefront/gift-cards/{code} **Soldul unui card cadou** Pentru un cod necunoscut, răspunsul este 404. Autentificare: cheia magazinului. Parametri: - `code` (path, obligatoriu) Răspuns: - `2XX`: `GiftCardBalance` ### GET /storefront/gift-cards/offer **Oferta de carduri cadou** Sumele propuse, minimul, maximul și valabilitatea în luni ale unui card cadou cumpărat la un punct de lucru. Autentificare: cheia magazinului. Parametri: - `location` (query, obligatoriu) Răspuns: - `2XX`: `StorefrontGiftCardOffer` ## Schemele ### ApiErrorResponse ```json {"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"object","properties":{"statusCode":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string"},"message":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"timestamp":{"type":"string"},"path":{"type":"string"},"requestId":{"type":"string"}},"required":["statusCode","message","error","timestamp","path"]}},"required":["success","error"]} ``` ### CustomerAccount ```json {"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"billing":{"anyOf":[{"$ref":"#/components/schemas/CustomerBillingProfile"},{"type":"null"}]},"marketingConsent":{"type":"boolean"},"linkedProviders":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontAuthProvider"}}},"required":["id","name","phone","email","billing","marketingConsent","linkedProviders"],"additionalProperties":false} ``` ### CustomerAddressListResponseOutput ```json {"type":"object","properties":{"addresses":{"type":"array","items":{"$ref":"#/components/schemas/CustomerAddressOutput"}}},"required":["addresses"]} ``` ### CustomerAddressOutput ```json {"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"label":{"type":["string","null"]},"address":{"$ref":"#/components/schemas/PostalAddressOutput"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","customerId","label","address","createdAt","updatedAt"]} ``` ### CustomerBillingProfile ```json {"type":"object","properties":{"companyName":{"type":"string"},"taxId":{"type":"string"},"tradeRegisterNumber":{"type":["string","null"]},"address":{"type":"string"}},"required":["companyName","taxId","tradeRegisterNumber","address"],"additionalProperties":false} ``` ### CustomerCodeChannel ```json {"type":"string","enum":["phone","email"]} ``` ### CustomerCodeRequest ```json {"type":"object","properties":{"channel":{"$ref":"#/components/schemas/CustomerCodeChannel"},"destination":{"type":"string","minLength":3,"maxLength":255}},"required":["channel","destination"],"additionalProperties":false} ``` ### CustomerCodeSent ```json {"type":"object","properties":{"expiresAt":{"type":"string"},"resendAfterSeconds":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["expiresAt","resendAfterSeconds"],"additionalProperties":false} ``` ### CustomerCodeVerifyRequest ```json {"type":"object","properties":{"channel":{"$ref":"#/components/schemas/CustomerCodeChannel"},"destination":{"type":"string","minLength":3,"maxLength":255},"code":{"type":"string","pattern":"^\\d{6}$"}},"required":["channel","destination","code"],"additionalProperties":false} ``` ### CustomerMarketingConsentRequest ```json {"type":"object","properties":{"granted":{"type":"boolean"}},"required":["granted"],"additionalProperties":false} ``` ### DeleteCustomerAccountRequest ```json {"type":"object","properties":{"confirm":{"type":"boolean","const":true}},"required":["confirm"],"additionalProperties":false} ``` ### GeoPoint ```json {"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["latitude","longitude"],"additionalProperties":false} ``` ### GiftCardAmountText ```json {"type":"string","pattern":"^\\d{1,5}(\\.\\d{1,2})?$"} ``` ### GiftCardBalance ```json {"type":"object","properties":{"code":{"type":"string"},"state":{"$ref":"#/components/schemas/GiftCardState"},"balance":{"$ref":"#/components/schemas/MoneyAmount"},"expiresAt":{"type":["string","null"]}},"required":["code","state","balance","expiresAt"]} ``` ### GiftCardRefusal ```json {"type":"string","enum":["not_found","pending","cancelled","expired","empty","insufficient","currency"]} ``` ### GiftCardState ```json {"type":"string","enum":["pending","active","empty","expired","cancelled"]} ``` ### InvoiceAddress ```json {"type":"object","properties":{"countryCode":{"type":"string","minLength":2,"maxLength":2},"county":{"type":"string","minLength":1,"maxLength":80},"city":{"type":"string","minLength":1,"maxLength":120},"street":{"type":"string","minLength":1,"maxLength":200},"streetNumber":{"default":null,"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"postalCode":{"default":null,"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]}},"required":["countryCode","county","city","street"],"additionalProperties":false} ``` ### InvoiceAddressOutput ```json {"type":"object","properties":{"countryCode":{"type":"string","minLength":2,"maxLength":2},"county":{"type":"string","minLength":1,"maxLength":80},"city":{"type":"string","minLength":1,"maxLength":120},"street":{"type":"string","minLength":1,"maxLength":200},"streetNumber":{"default":null,"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"postalCode":{"default":null,"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]}},"required":["countryCode","county","city","street","streetNumber","postalCode"]} ``` ### MoneyAmount ```json {"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["amount","currency"]} ``` ### PostalAddress ```json {"type":"object","properties":{"street":{"type":"string","minLength":1,"maxLength":200},"streetNumber":{"default":null,"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"block":{"default":null,"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"staircase":{"default":null,"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"floor":{"default":null,"anyOf":[{"type":"string","maxLength":10},{"type":"null"}]},"apartment":{"default":null,"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"city":{"type":"string","minLength":1,"maxLength":120},"directions":{"default":null,"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["street","city","latitude","longitude"],"additionalProperties":false} ``` ### PostalAddressOutput ```json {"type":"object","properties":{"street":{"type":"string","minLength":1,"maxLength":200},"streetNumber":{"default":null,"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"block":{"default":null,"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"staircase":{"default":null,"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"floor":{"default":null,"anyOf":[{"type":"string","maxLength":10},{"type":"null"}]},"apartment":{"default":null,"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"city":{"type":"string","minLength":1,"maxLength":120},"directions":{"default":null,"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["street","streetNumber","block","staircase","floor","apartment","city","directions","latitude","longitude"]} ``` ### PromotionCodeRefusal ```json {"type":"string","enum":["not_found","disabled","not_started","expired","stopped","outside_hours","wrong_channel","wrong_location","wrong_order_type","not_for_customer","first_order_only","customer_required","used_up","already_used","below_minimum","promotion_exclusive","promotion_better","manual_exclusive","nothing_to_discount"]} ``` ### PromotionOrderType ```json {"type":"string","enum":["dine_in","takeaway","delivery"]} ``` ### SaveCustomerAddressRequest ```json {"type":"object","properties":{"label":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"address":{"$ref":"#/components/schemas/PostalAddress"}},"required":["address"],"additionalProperties":false} ``` ### SaveCustomerAddressRequestOutput ```json {"type":"object","properties":{"label":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"address":{"$ref":"#/components/schemas/PostalAddressOutput"}},"required":["label","address"]} ``` ### SaveCustomerBillingProfileRequest ```json {"type":"object","properties":{"companyName":{"type":"string","minLength":1,"maxLength":200},"taxId":{"type":"string","pattern":"^(RO)?\\s?\\d{2,10}$"},"tradeRegisterNumber":{"default":null,"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"address":{"type":"string","minLength":3,"maxLength":300}},"required":["companyName","taxId","address"],"additionalProperties":false} ``` ### SaveCustomerBillingProfileRequestOutput ```json {"type":"object","properties":{"companyName":{"type":"string","minLength":1,"maxLength":200},"taxId":{"type":"string","pattern":"^(RO)?\\s?\\d{2,10}$"},"tradeRegisterNumber":{"default":null,"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"address":{"type":"string","minLength":3,"maxLength":300}},"required":["companyName","taxId","tradeRegisterNumber","address"]} ``` ### StorefrontAccountOrderOutput ```json {"type":"object","properties":{"order":{"$ref":"#/components/schemas/StorefrontOrderOutput"},"accessToken":{"type":"string"}},"required":["order","accessToken"]} ``` ### StorefrontAccountOrdersQuery ```json {"type":"object","properties":{"limit":{"default":20,"type":"integer","minimum":1,"maximum":50},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}} ``` ### StorefrontAccountOrdersQueryOutput ```json {"type":"object","properties":{"limit":{"default":20,"type":"integer","minimum":1,"maximum":50},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["limit","offset"]} ``` ### StorefrontAccountOrdersResponseOutput ```json {"type":"object","properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontAccountOrderOutput"}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["orders","total"]} ``` ### StorefrontAddressCheckRequest ```json {"type":"object","properties":{"address":{"type":"string","minLength":3,"maxLength":200},"point":{"default":null,"anyOf":[{"$ref":"#/components/schemas/GeoPoint"},{"type":"null"}]},"locationId":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"productsTotal":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{1,9}(?:\\.\\d{1,2})?$"},{"type":"null"}]}},"required":["address"]} ``` ### StorefrontAddressCheckRequestOutput ```json {"type":"object","properties":{"address":{"type":"string","minLength":3,"maxLength":200},"point":{"default":null,"anyOf":[{"$ref":"#/components/schemas/GeoPoint"},{"type":"null"}]},"locationId":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"productsTotal":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{1,9}(?:\\.\\d{1,2})?$"},{"type":"null"}]}},"required":["address","point","locationId","productsTotal"]} ``` ### StorefrontAddressCheckResponse ```json {"type":"object","properties":{"outcome":{"$ref":"#/components/schemas/StorefrontAddressOutcome"},"point":{"anyOf":[{"$ref":"#/components/schemas/GeoPoint"},{"type":"null"}]},"location":{"anyOf":[{"$ref":"#/components/schemas/StorefrontAddressLocation"},{"type":"null"}]},"delivery":{"anyOf":[{"$ref":"#/components/schemas/StorefrontDeliveryTerms"},{"type":"null"}]}},"required":["outcome","point","location","delivery"],"additionalProperties":false} ``` ### StorefrontAddressLocation ```json {"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"phone":{"type":["string","null"]}},"required":["id","name","phone"],"additionalProperties":false} ``` ### StorefrontAddressOutcome ```json {"type":"string","enum":["delivers","outside_zones","not_found"]} ``` ### StorefrontAuthExchangeRequest ```json {"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":2048},"redirectUri":{"type":"string","maxLength":500,"format":"uri"},"nonce":{"type":"string","minLength":16,"maxLength":128},"name":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["code","redirectUri","nonce"],"additionalProperties":false} ``` ### StorefrontAuthExchangeRequestOutput ```json {"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":2048},"redirectUri":{"type":"string","maxLength":500,"format":"uri"},"nonce":{"type":"string","minLength":16,"maxLength":128},"name":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["code","redirectUri","nonce","name"]} ``` ### StorefrontAuthProvider ```json {"type":"string","enum":["google","apple","facebook"]} ``` ### StorefrontAuthProvidersResponse ```json {"type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{"provider":{"$ref":"#/components/schemas/StorefrontAuthProvider"},"clientId":{"type":"string"}},"required":["provider","clientId"],"additionalProperties":false}}},"required":["providers"],"additionalProperties":false} ``` ### StorefrontBundleComponent ```json {"type":"object","properties":{"productId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"quantity":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["productId","name","quantity"],"additionalProperties":false} ``` ### StorefrontBundleOutput ```json {"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"slug":{"type":"string"},"name":{"type":"string"},"price":{"$ref":"#/components/schemas/MoneyAmount"},"available":{"type":"boolean"},"unavailableReason":{"anyOf":[{"$ref":"#/components/schemas/StorefrontUnavailableReason"},{"type":"null"}]},"availableFrom":{"default":null,"type":["string","null"]},"availableUntil":{"default":null,"type":["string","null"]},"components":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontBundleComponent"}}},"required":["id","slug","name","price","available","unavailableReason","availableFrom","availableUntil","components"]} ``` ### StorefrontCancelOrderRequest ```json {"type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":128}},"required":["token"],"additionalProperties":false} ``` ### StorefrontCartLineInput ```json {"type":"object","properties":{"productId":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"bundleId":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"quantity":{"type":"integer","minimum":1,"maximum":99},"modifierOptionIds":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"note":{"default":null,"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["quantity"]} ``` ### StorefrontCartLineInputOutput ```json {"type":"object","properties":{"productId":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"bundleId":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"quantity":{"type":"integer","minimum":1,"maximum":99},"modifierOptionIds":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"note":{"default":null,"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["productId","bundleId","quantity","modifierOptionIds","note"]} ``` ### StorefrontCartLineProblem ```json {"type":"string","enum":["not_on_menu","not_offered_today","sold_out","outside_hours","no_price","invalid_options"]} ``` ### StorefrontCategoryOutput ```json {"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"parentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"products":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontProductOutput"}}},"required":["id","slug","name","description","parentId","products"]} ``` ### StorefrontClosedReason ```json {"type":"string","enum":["not_configured","paused","outside_hours"]} ``` ### StorefrontCompanyLookupQuery ```json {"type":"object","properties":{"vatId":{"type":"string","minLength":1,"maxLength":20}},"required":["vatId"],"additionalProperties":false} ``` ### StorefrontCompanyLookupResponseOutput ```json {"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"found"},"company":{"type":"object","properties":{"vatId":{"type":"string"},"vatPayer":{"type":"boolean"},"name":{"type":["string","null"]},"tradeRegistry":{"type":["string","null"]},"address":{"anyOf":[{"$ref":"#/components/schemas/InvoiceAddressOutput"},{"type":"null"}]},"inactive":{"type":"boolean"}},"required":["vatId","vatPayer","name","tradeRegistry","address","inactive"]}},"required":["status","company"]},{"type":"object","properties":{"status":{"type":"string","const":"invalid"}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","const":"unknown"}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","const":"unavailable"}},"required":["status"]}]} ``` ### StorefrontDeliveryTerms ```json {"type":"object","properties":{"zone":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"deliveryFee":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}]},"minimumOrder":{"$ref":"#/components/schemas/MoneyAmount"},"freeDeliveryAbove":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}]},"estimatedMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"freeDelivery":{"type":"boolean"},"belowMinimumBy":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}]}},"required":["zone","deliveryFee","minimumOrder","freeDeliveryAbove","estimatedMinutes","freeDelivery","belowMinimumBy"],"additionalProperties":false} ``` ### StorefrontFulfillment ```json {"type":"string","enum":["delivery","pickup"]} ``` ### StorefrontGiftCardOffer ```json {"type":"object","properties":{"available":{"type":"boolean"},"amounts":{"type":"array","items":{"$ref":"#/components/schemas/MoneyAmount"}},"min":{"$ref":"#/components/schemas/MoneyAmount"},"max":{"$ref":"#/components/schemas/MoneyAmount"},"validityMonths":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["available","amounts","min","max","validityMonths"]} ``` ### StorefrontGiftCardOfferQuery ```json {"type":"object","properties":{"location":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["location"]} ``` ### StorefrontGiftCardPurchaseRequest ```json {"type":"object","properties":{"locationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"amount":{"$ref":"#/components/schemas/GiftCardAmountText"},"buyer":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"],"additionalProperties":false},"recipient":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"],"additionalProperties":false},"message":{"default":null,"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["locationId","amount","buyer","recipient"],"additionalProperties":false} ``` ### StorefrontGiftCardPurchaseRequestOutput ```json {"type":"object","properties":{"locationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"amount":{"$ref":"#/components/schemas/GiftCardAmountText"},"buyer":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]},"recipient":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]},"message":{"default":null,"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["locationId","amount","buyer","recipient","message"]} ``` ### StorefrontGiftCardPurchaseResponse ```json {"type":"object","properties":{"purchaseId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"amount":{"$ref":"#/components/schemas/MoneyAmount"},"paymentUrl":{"type":"string"}},"required":["purchaseId","amount","paymentUrl"]} ``` ### StorefrontHoursInterval ```json {"type":"object","properties":{"day":{"type":"integer","minimum":1,"maximum":7},"opens":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"closes":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"}},"required":["day","opens","closes"],"additionalProperties":false} ``` ### StorefrontInvoiceCompanyRequest ```json {"type":"object","properties":{"kind":{"type":"string","const":"company"},"vatId":{"type":"string","minLength":2,"maxLength":20},"name":{"default":null,"anyOf":[{"type":"string","minLength":2,"maxLength":255},{"type":"null"}]},"tradeRegistry":{"default":null,"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"address":{"default":null,"anyOf":[{"$ref":"#/components/schemas/InvoiceAddress"},{"type":"null"}]}},"required":["kind","vatId"],"additionalProperties":false} ``` ### StorefrontInvoiceCompanyRequestOutput ```json {"type":"object","properties":{"kind":{"type":"string","const":"company"},"vatId":{"type":"string","minLength":2,"maxLength":20},"name":{"default":null,"anyOf":[{"type":"string","minLength":2,"maxLength":255},{"type":"null"}]},"tradeRegistry":{"default":null,"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"address":{"default":null,"anyOf":[{"$ref":"#/components/schemas/InvoiceAddressOutput"},{"type":"null"}]}},"required":["kind","vatId","name","tradeRegistry","address"]} ``` ### StorefrontInvoicePersonRequest ```json {"type":"object","properties":{"kind":{"type":"string","const":"person"},"name":{"type":"string","minLength":2,"maxLength":255},"address":{"$ref":"#/components/schemas/InvoiceAddress"}},"required":["kind","name","address"],"additionalProperties":false} ``` ### StorefrontInvoicePersonRequestOutput ```json {"type":"object","properties":{"kind":{"type":"string","const":"person"},"name":{"type":"string","minLength":2,"maxLength":255},"address":{"$ref":"#/components/schemas/InvoiceAddressOutput"}},"required":["kind","name","address"]} ``` ### StorefrontInvoiceRequest ```json {"oneOf":[{"$ref":"#/components/schemas/StorefrontInvoiceCompanyRequest"},{"$ref":"#/components/schemas/StorefrontInvoicePersonRequest"}]} ``` ### StorefrontInvoiceRequestOutput ```json {"oneOf":[{"$ref":"#/components/schemas/StorefrontInvoiceCompanyRequestOutput"},{"$ref":"#/components/schemas/StorefrontInvoicePersonRequestOutput"}]} ``` ### StorefrontLocationOutput ```json {"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"address":{"type":["string","null"]},"phone":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/StorefrontLocationStatus"},"closedReason":{"anyOf":[{"$ref":"#/components/schemas/StorefrontClosedReason"},{"type":"null"}]},"weeklyHours":{"$ref":"#/components/schemas/StorefrontWeeklyHours"},"timeZone":{"type":"string"},"estimatedMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pickup":{"default":null,"anyOf":[{"type":"object","properties":{"estimatedMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["estimatedMinutes"]},{"type":"null"}]},"scheduling":{"default":null,"anyOf":[{"type":"object","properties":{"daysAhead":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cancelMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["daysAhead","cancelMinutes"]},{"type":"null"}]},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontPaymentMethod"}}},"required":["id","name","address","phone","status","closedReason","weeklyHours","timeZone","estimatedMinutes","pickup","scheduling","paymentMethods"]} ``` ### StorefrontLocationStatus ```json {"type":"string","enum":["open","paused","closed"]} ``` ### StorefrontLocationsResponseOutput ```json {"type":"object","properties":{"locations":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontLocationOutput"}}},"required":["locations"]} ``` ### StorefrontMenuQuery ```json {"type":"object","properties":{"location":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"Punctul de lucru, `id` din `GET /storefront/locations`."}},"required":["location"],"examples":[{"location":"0b9d3a52-6c1e-4f3a-9a52-2f0c7d4e8a11"}]} ``` ### StorefrontMenuResponseOutput ```json {"type":"object","properties":{"locationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"currency":{"type":"string","minLength":3,"maxLength":3},"timeZone":{"default":"Europe/Bucharest","type":"string","minLength":1},"categories":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontCategoryOutput"}},"uncategorized":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontProductOutput"}},"modifierGroups":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontModifierGroup"}},"bundles":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontBundleOutput"}},"promotions":{"default":[],"type":"array","items":{"$ref":"#/components/schemas/StorefrontPromotionOutput"}},"tags":{"default":[],"type":"array","items":{"$ref":"#/components/schemas/StorefrontTag"}}},"required":["locationId","currency","timeZone","categories","uncategorized","modifierGroups","bundles","promotions","tags"]} ``` ### StorefrontModifierGroup ```json {"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"minSelected":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxSelected":{"type":"integer","minimum":1,"maximum":9007199254740991},"options":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontModifierOption"}}},"required":["id","name","minSelected","maxSelected","options"],"additionalProperties":false} ``` ### StorefrontModifierOption ```json {"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"priceDelta":{"$ref":"#/components/schemas/MoneyAmount"},"available":{"type":"boolean"}},"required":["id","name","priceDelta","available"],"additionalProperties":false} ``` ### StorefrontOrderLine ```json {"type":"object","properties":{"productId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"bundleId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"modifierOptionIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"note":{"type":["string","null"]},"unitPrice":{"$ref":"#/components/schemas/MoneyAmount"},"lineTotal":{"$ref":"#/components/schemas/MoneyAmount"}},"required":["productId","bundleId","name","quantity","modifierOptionIds","note","unitPrice","lineTotal"],"additionalProperties":false} ``` ### StorefrontOrderOutput ```json {"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"locationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"status":{"$ref":"#/components/schemas/StorefrontOrderStatus"},"paymentMethod":{"$ref":"#/components/schemas/StorefrontPaymentMethod"},"currency":{"type":"string","minLength":3,"maxLength":3},"lines":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontOrderLine"}},"productsTotal":{"$ref":"#/components/schemas/MoneyAmount"},"feeLines":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontQuoteFeeLine"}},"total":{"$ref":"#/components/schemas/MoneyAmount"},"placedAt":{"type":"string"},"expiresAt":{"type":["string","null"]},"sentToKitchenAt":{"type":["string","null"]},"fulfillment":{"default":"delivery","$ref":"#/components/schemas/StorefrontFulfillment"},"estimatedReadyAt":{"default":null,"type":["string","null"]},"estimatedDeliveryAt":{"default":null,"type":["string","null"]},"deliveryAddress":{"default":null,"type":["string","null"]},"readyAt":{"default":null,"type":["string","null"]},"onTheWayAt":{"default":null,"type":["string","null"]},"deliveredAt":{"default":null,"type":["string","null"]},"scheduledFor":{"default":null,"type":["string","null"]},"cancellableUntil":{"default":null,"type":["string","null"]},"invoice":{"default":null,"anyOf":[{"type":"string","enum":["company","person"]},{"type":"null"}]},"orderCode":{"default":null,"type":["string","null"]}},"required":["id","locationId","status","paymentMethod","currency","lines","productsTotal","feeLines","total","placedAt","expiresAt","sentToKitchenAt","fulfillment","estimatedReadyAt","estimatedDeliveryAt","deliveryAddress","readyAt","onTheWayAt","deliveredAt","scheduledFor","cancellableUntil","invoice","orderCode"]} ``` ### StorefrontOrderQuery ```json {"type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":128}},"required":["token"]} ``` ### StorefrontOrderRefusal ```json {"type":"string","enum":["not_orderable","payment_method_unavailable","online_payment_unavailable","online_payment_failed","online_payment_too_far","promotion_code_unavailable","gift_card_unavailable","invoice_vat_id_invalid","invoice_company_unknown","invoice_details_missing"]} ``` ### StorefrontOrderRefusalDetails ```json {"type":"object","properties":{"code":{"type":"string","const":"STOREFRONT_ORDER_REFUSED"},"reason":{"$ref":"#/components/schemas/StorefrontOrderRefusal"},"quote":{"anyOf":[{"$ref":"#/components/schemas/StorefrontQuoteResponse"},{"type":"null"}]}},"required":["code","reason","quote"],"additionalProperties":false} ``` ### StorefrontOrderRefusalDetailsOutput ```json {"type":"object","properties":{"code":{"type":"string","const":"STOREFRONT_ORDER_REFUSED"},"reason":{"$ref":"#/components/schemas/StorefrontOrderRefusal"},"quote":{"anyOf":[{"$ref":"#/components/schemas/StorefrontQuoteResponseOutput"},{"type":"null"}]}},"required":["code","reason","quote"]} ``` ### StorefrontOrderStatus ```json {"type":"string","enum":["awaiting_payment","awaiting_dispatch","scheduled","sent_to_kitchen","rejected","expired","cancelled"]} ``` ### StorefrontPaymentMethod ```json {"type":"object","properties":{"key":{"$ref":"#/components/schemas/StorefrontPaymentMethodKey"},"label":{"type":"string"},"settlement":{"$ref":"#/components/schemas/StorefrontPaymentSettlement"}},"required":["key","label","settlement"],"additionalProperties":false} ``` ### StorefrontPaymentMethodKey ```json {"type":"string","minLength":1,"maxLength":64} ``` ### StorefrontPaymentSettlement ```json {"type":"string","enum":["on_delivery","online"]} ``` ### StorefrontPlaceOrderRequest ```json {"type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$","description":"Cheia coșului, aleasă de site o dată pe coș. O cerere cu aceeași cheie primește aceeași comandă. Aceeași cheie trimisă cu alt coș este refuzată."},"locationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"Punctul de lucru, `id` din `GET /storefront/locations`."},"lines":{"minItems":1,"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/StorefrontCartLineInput"},"description":"Liniile coșului, fără prețuri. Serverul calculează din nou prețul."},"customer":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"phone":{"type":"string","minLength":6,"maxLength":32},"email":{"default":null,"anyOf":[{"type":"string","maxLength":255,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]}},"required":["name","phone"],"description":"Clientul care comandă. Se caută după numărul de telefon, iar dacă nu există, se adaugă ca client nou."},"fulfillment":{"default":"delivery","description":"`delivery` (implicit) înseamnă livrare la adresă, `pickup` înseamnă ridicare din local.","$ref":"#/components/schemas/StorefrontFulfillment"},"delivery":{"default":null,"description":"Adresa de livrare, obligatorie la `delivery`. La `pickup` se ignoră.","anyOf":[{"$ref":"#/components/schemas/PostalAddress"},{"type":"null"}]},"note":{"default":null,"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"paymentMethodKey":{"description":"Metoda de plată, `key` din `paymentMethods` ale punctului de lucru.","$ref":"#/components/schemas/StorefrontPaymentMethodKey"},"consents":{"type":"object","properties":{"terms":{"type":"boolean","const":true},"marketing":{"default":false,"type":"boolean"},"feedback":{"default":false,"type":"boolean"}},"required":["terms"]},"scheduledFor":{"default":null,"type":["string","null"]},"invoice":{"default":null,"anyOf":[{"$ref":"#/components/schemas/StorefrontInvoiceRequest"},{"type":"null"}]},"code":{"default":null,"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"giftCardCode":{"default":null,"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["idempotencyKey","locationId","lines","customer","paymentMethodKey","consents"],"examples":[{"idempotencyKey":"cos-7f3a9c2e41","locationId":"0b9d3a52-6c1e-4f3a-9a52-2f0c7d4e8a11","lines":[{"productId":"5a1c2e7f-3b4d-4c6e-8f9a-0b1c2d3e4f50","bundleId":null,"quantity":2,"modifierOptionIds":[],"note":null}],"customer":{"name":"Ana Popescu","phone":"+40722123456","email":"ana@example.com"},"fulfillment":"delivery","delivery":{"street":"Strada Lungă","streetNumber":"12","block":null,"staircase":null,"floor":null,"apartment":null,"city":"Brașov","directions":"Interfon 17","latitude":45.6427,"longitude":25.5887},"note":null,"paymentMethodKey":"cash","consents":{"terms":true,"marketing":false,"feedback":false},"scheduledFor":null,"invoice":null,"code":null,"giftCardCode":null}]} ``` ### StorefrontPlaceOrderRequestOutput ```json {"type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$","description":"Cheia coșului, aleasă de site o dată pe coș. O cerere cu aceeași cheie primește aceeași comandă. Aceeași cheie trimisă cu alt coș este refuzată."},"locationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"Punctul de lucru, `id` din `GET /storefront/locations`."},"lines":{"minItems":1,"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/StorefrontCartLineInputOutput"},"description":"Liniile coșului, fără prețuri. Serverul calculează din nou prețul."},"customer":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"phone":{"type":"string","minLength":6,"maxLength":32},"email":{"default":null,"anyOf":[{"type":"string","maxLength":255,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]}},"required":["name","phone","email"],"description":"Clientul care comandă. Se caută după numărul de telefon, iar dacă nu există, se adaugă ca client nou."},"fulfillment":{"default":"delivery","description":"`delivery` (implicit) înseamnă livrare la adresă, `pickup` înseamnă ridicare din local.","$ref":"#/components/schemas/StorefrontFulfillment"},"delivery":{"default":null,"description":"Adresa de livrare, obligatorie la `delivery`. La `pickup` se ignoră.","anyOf":[{"$ref":"#/components/schemas/PostalAddressOutput"},{"type":"null"}]},"note":{"default":null,"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"paymentMethodKey":{"description":"Metoda de plată, `key` din `paymentMethods` ale punctului de lucru.","$ref":"#/components/schemas/StorefrontPaymentMethodKey"},"consents":{"type":"object","properties":{"terms":{"type":"boolean","const":true},"marketing":{"default":false,"type":"boolean"},"feedback":{"default":false,"type":"boolean"}},"required":["terms","marketing","feedback"]},"scheduledFor":{"default":null,"type":["string","null"]},"invoice":{"default":null,"anyOf":[{"$ref":"#/components/schemas/StorefrontInvoiceRequestOutput"},{"type":"null"}]},"code":{"default":null,"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"giftCardCode":{"default":null,"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["idempotencyKey","locationId","lines","customer","fulfillment","delivery","note","paymentMethodKey","consents","scheduledFor","invoice","code","giftCardCode"],"examples":[{"idempotencyKey":"cos-7f3a9c2e41","locationId":"0b9d3a52-6c1e-4f3a-9a52-2f0c7d4e8a11","lines":[{"productId":"5a1c2e7f-3b4d-4c6e-8f9a-0b1c2d3e4f50","bundleId":null,"quantity":2,"modifierOptionIds":[],"note":null}],"customer":{"name":"Ana Popescu","phone":"+40722123456","email":"ana@example.com"},"fulfillment":"delivery","delivery":{"street":"Strada Lungă","streetNumber":"12","block":null,"staircase":null,"floor":null,"apartment":null,"city":"Brașov","directions":"Interfon 17","latitude":45.6427,"longitude":25.5887},"note":null,"paymentMethodKey":"cash","consents":{"terms":true,"marketing":false,"feedback":false},"scheduledFor":null,"invoice":null,"code":null,"giftCardCode":null}]} ``` ### StorefrontPlaceOrderResponseOutput ```json {"type":"object","properties":{"order":{"$ref":"#/components/schemas/StorefrontOrderOutput"},"accessToken":{"type":"string"},"paymentUrl":{"type":["string","null"]}},"required":["order","accessToken","paymentUrl"]} ``` ### StorefrontProductOutput ```json {"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"portionLabel":{"default":null,"type":["string","null"]},"labels":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"tags":{"default":[],"type":"array","items":{"$ref":"#/components/schemas/StorefrontTag"}},"imageUrl":{"type":["string","null"]},"price":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}]},"compareAtPrice":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}]},"allergens":{"type":"array","items":{"type":"string","enum":["celery","crustaceans","eggs","fish","gluten","lupin","milk","molluscs","mustard","peanuts","sesame","soy","sulphites","sulfur_dioxide","tree_nuts"]}},"available":{"type":"boolean"},"unavailableReason":{"anyOf":[{"$ref":"#/components/schemas/StorefrontUnavailableReason"},{"type":"null"}]},"availableFrom":{"default":null,"type":["string","null"]},"availableUntil":{"default":null,"type":["string","null"]},"modifierGroupIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"promotionIds":{"default":[],"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}},"required":["id","slug","name","description","portionLabel","labels","tags","imageUrl","price","compareAtPrice","allergens","available","unavailableReason","availableFrom","availableUntil","modifierGroupIds","promotionIds"]} ``` ### StorefrontPromotionBenefit ```json {"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"percent"},"percent":{"type":"number"}},"required":["kind","percent"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"amount"},"amount":{"$ref":"#/components/schemas/MoneyAmount"}},"required":["kind","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"nth"},"nth":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"percent":{"type":"number"}},"required":["kind","nth","percent"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"buy_get"},"buyQuantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"getQuantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"percent":{"type":"number"}},"required":["kind","buyQuantity","getQuantity","percent"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"free_delivery"}},"required":["kind"],"additionalProperties":false}]} ``` ### StorefrontPromotionOutput ```json {"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"description":{"default":null,"type":["string","null"]},"scope":{"type":"string","enum":["products","order","delivery"]},"benefit":{"$ref":"#/components/schemas/StorefrontPromotionBenefit"},"minOrder":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}]},"hours":{"$ref":"#/components/schemas/StorefrontWeeklyHours"},"lastDay":{"type":["string","null"]},"orderTypes":{"type":"array","items":{"$ref":"#/components/schemas/PromotionOrderType"}},"firstOrderOnly":{"type":"boolean"},"getProductIds":{"default":[],"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}},"required":["id","name","description","scope","benefit","minOrder","hours","lastDay","orderTypes","firstOrderOnly","getProductIds"]} ``` ### StorefrontQuoteCode ```json {"type":"object","properties":{"code":{"type":"string"},"refusal":{"anyOf":[{"$ref":"#/components/schemas/PromotionCodeRefusal"},{"type":"null"}]}},"required":["code","refusal"],"additionalProperties":false} ``` ### StorefrontQuoteDelivery ```json {"type":"object","properties":{"outcome":{"type":"string","enum":["delivers","outside_zones","not_found"]},"zone":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"fee":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}]},"freeDelivery":{"type":"boolean"},"freeDeliveryAbove":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}]},"minimumOrder":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}]},"estimatedMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["outcome","zone","fee","freeDelivery","freeDeliveryAbove","minimumOrder","estimatedMinutes"],"additionalProperties":false} ``` ### StorefrontQuoteDiscount ```json {"type":"object","properties":{"label":{"type":"string"},"amount":{"$ref":"#/components/schemas/MoneyAmount"},"lineIndex":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"source":{"default":"promotion","type":"string","enum":["promotion","code"]}},"required":["label","amount","lineIndex"],"additionalProperties":false} ``` ### StorefrontQuoteDiscountOutput ```json {"type":"object","properties":{"label":{"type":"string"},"amount":{"$ref":"#/components/schemas/MoneyAmount"},"lineIndex":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"source":{"default":"promotion","type":"string","enum":["promotion","code"]}},"required":["label","amount","lineIndex","source"]} ``` ### StorefrontQuoteFeeLine ```json {"type":"object","properties":{"label":{"type":"string"},"amount":{"$ref":"#/components/schemas/MoneyAmount"},"vatRatePercent":{"type":"number"}},"required":["label","amount","vatRatePercent"],"additionalProperties":false} ``` ### StorefrontQuoteGiftCard ```json {"type":"object","properties":{"code":{"type":"string"},"amount":{"$ref":"#/components/schemas/MoneyAmount"},"refusal":{"anyOf":[{"$ref":"#/components/schemas/GiftCardRefusal"},{"type":"null"}]}},"required":["code","amount","refusal"],"additionalProperties":false} ``` ### StorefrontQuoteLine ```json {"type":"object","properties":{"productId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"bundleId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":["string","null"]},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"modifierOptionIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"note":{"type":["string","null"]},"unitPrice":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}]},"lineTotal":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}]},"listTotal":{"default":null,"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}]},"problem":{"anyOf":[{"$ref":"#/components/schemas/StorefrontCartLineProblem"},{"type":"null"}]}},"required":["productId","bundleId","name","quantity","modifierOptionIds","note","unitPrice","lineTotal","problem"],"additionalProperties":false} ``` ### StorefrontQuoteLineOutput ```json {"type":"object","properties":{"productId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"bundleId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":["string","null"]},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"modifierOptionIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"note":{"type":["string","null"]},"unitPrice":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}]},"lineTotal":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}]},"listTotal":{"default":null,"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}]},"problem":{"anyOf":[{"$ref":"#/components/schemas/StorefrontCartLineProblem"},{"type":"null"}]}},"required":["productId","bundleId","name","quantity","modifierOptionIds","note","unitPrice","lineTotal","listTotal","problem"]} ``` ### StorefrontQuoteRefusal ```json {"type":"object","properties":{"reason":{"$ref":"#/components/schemas/StorefrontQuoteRefusalReason"},"missing":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}]}},"required":["reason","missing"],"additionalProperties":false} ``` ### StorefrontQuoteRefusalReason ```json {"type":"string","enum":["closed","empty","scheduling_unavailable","slot_unavailable","slot_full","pickup_unavailable","address_required","address_not_found","outside_zones","below_minimum"]} ``` ### StorefrontQuoteRequest ```json {"type":"object","properties":{"locationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"Punctul de lucru, `id` din `GET /storefront/locations`."},"lines":{"minItems":1,"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/StorefrontCartLineInput"},"description":"Liniile coșului, fără prețuri: un produs sau un meniu combo pe linie."},"fulfillment":{"default":"delivery","description":"`delivery` (implicit) înseamnă livrare la adresă, `pickup` înseamnă ridicare din local.","$ref":"#/components/schemas/StorefrontFulfillment"},"delivery":{"default":null,"description":"Adresa de livrare, scrisă pe un singur rând, cu punctul pe hartă din `address-check`. Fără adresă, prețul nu include taxa de livrare.","anyOf":[{"type":"object","properties":{"address":{"type":"string","minLength":3,"maxLength":200},"point":{"default":null,"anyOf":[{"$ref":"#/components/schemas/GeoPoint"},{"type":"null"}]}},"required":["address"]},{"type":"null"}]},"scheduledFor":{"default":null,"description":"Începutul unui interval din `GET /storefront/slots`, pentru o comandă programată. `null` (implicit) înseamnă că comanda se pregătește cât mai curând.","type":["string","null"]},"code":{"default":null,"description":"Codul de reducere.","anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"giftCardCode":{"default":null,"description":"Codul cardului cadou cu care se plătește.","anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["locationId","lines"],"examples":[{"locationId":"0b9d3a52-6c1e-4f3a-9a52-2f0c7d4e8a11","lines":[{"productId":"5a1c2e7f-3b4d-4c6e-8f9a-0b1c2d3e4f50","bundleId":null,"quantity":2,"modifierOptionIds":[],"note":"fără ceapă"}],"fulfillment":"delivery","delivery":{"address":"Strada Lungă 12, Brașov","point":{"latitude":45.6427,"longitude":25.5887}},"scheduledFor":null,"code":null,"giftCardCode":null}]} ``` ### StorefrontQuoteRequestOutput ```json {"type":"object","properties":{"locationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"Punctul de lucru, `id` din `GET /storefront/locations`."},"lines":{"minItems":1,"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/StorefrontCartLineInputOutput"},"description":"Liniile coșului, fără prețuri: un produs sau un meniu combo pe linie."},"fulfillment":{"default":"delivery","description":"`delivery` (implicit) înseamnă livrare la adresă, `pickup` înseamnă ridicare din local.","$ref":"#/components/schemas/StorefrontFulfillment"},"delivery":{"default":null,"description":"Adresa de livrare, scrisă pe un singur rând, cu punctul pe hartă din `address-check`. Fără adresă, prețul nu include taxa de livrare.","anyOf":[{"type":"object","properties":{"address":{"type":"string","minLength":3,"maxLength":200},"point":{"default":null,"anyOf":[{"$ref":"#/components/schemas/GeoPoint"},{"type":"null"}]}},"required":["address","point"]},{"type":"null"}]},"scheduledFor":{"default":null,"description":"Începutul unui interval din `GET /storefront/slots`, pentru o comandă programată. `null` (implicit) înseamnă că comanda se pregătește cât mai curând.","type":["string","null"]},"code":{"default":null,"description":"Codul de reducere.","anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"giftCardCode":{"default":null,"description":"Codul cardului cadou cu care se plătește.","anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["locationId","lines","fulfillment","delivery","scheduledFor","code","giftCardCode"],"examples":[{"locationId":"0b9d3a52-6c1e-4f3a-9a52-2f0c7d4e8a11","lines":[{"productId":"5a1c2e7f-3b4d-4c6e-8f9a-0b1c2d3e4f50","bundleId":null,"quantity":2,"modifierOptionIds":[],"note":"fără ceapă"}],"fulfillment":"delivery","delivery":{"address":"Strada Lungă 12, Brașov","point":{"latitude":45.6427,"longitude":25.5887}},"scheduledFor":null,"code":null,"giftCardCode":null}]} ``` ### StorefrontQuoteResponse ```json {"type":"object","properties":{"locationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"currency":{"type":"string","minLength":3,"maxLength":3},"lines":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontQuoteLine"}},"productsTotal":{"$ref":"#/components/schemas/MoneyAmount"},"discounts":{"default":[],"type":"array","items":{"$ref":"#/components/schemas/StorefrontQuoteDiscount"}},"code":{"default":null,"anyOf":[{"$ref":"#/components/schemas/StorefrontQuoteCode"},{"type":"null"}]},"fulfillment":{"default":"delivery","$ref":"#/components/schemas/StorefrontFulfillment"},"delivery":{"anyOf":[{"$ref":"#/components/schemas/StorefrontQuoteDelivery"},{"type":"null"}]},"pickup":{"default":null,"anyOf":[{"type":"object","properties":{"estimatedMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["estimatedMinutes"],"additionalProperties":false},{"type":"null"}]},"scheduledFor":{"default":null,"type":["string","null"]},"feeLines":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontQuoteFeeLine"}},"taxLines":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontQuoteTaxLine"}},"vat":{"$ref":"#/components/schemas/MoneyAmount"},"total":{"$ref":"#/components/schemas/MoneyAmount"},"giftCard":{"default":null,"anyOf":[{"$ref":"#/components/schemas/StorefrontQuoteGiftCard"},{"type":"null"}]},"toPay":{"default":null,"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}]},"orderable":{"type":"boolean"},"refusals":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontQuoteRefusal"}}},"required":["locationId","currency","lines","productsTotal","delivery","feeLines","taxLines","vat","total","orderable","refusals"],"additionalProperties":false} ``` ### StorefrontQuoteResponseOutput ```json {"type":"object","properties":{"locationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"currency":{"type":"string","minLength":3,"maxLength":3},"lines":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontQuoteLineOutput"}},"productsTotal":{"$ref":"#/components/schemas/MoneyAmount"},"discounts":{"default":[],"type":"array","items":{"$ref":"#/components/schemas/StorefrontQuoteDiscountOutput"}},"code":{"default":null,"anyOf":[{"$ref":"#/components/schemas/StorefrontQuoteCode"},{"type":"null"}]},"fulfillment":{"default":"delivery","$ref":"#/components/schemas/StorefrontFulfillment"},"delivery":{"anyOf":[{"$ref":"#/components/schemas/StorefrontQuoteDelivery"},{"type":"null"}]},"pickup":{"default":null,"anyOf":[{"type":"object","properties":{"estimatedMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["estimatedMinutes"]},{"type":"null"}]},"scheduledFor":{"default":null,"type":["string","null"]},"feeLines":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontQuoteFeeLine"}},"taxLines":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontQuoteTaxLine"}},"vat":{"$ref":"#/components/schemas/MoneyAmount"},"total":{"$ref":"#/components/schemas/MoneyAmount"},"giftCard":{"default":null,"anyOf":[{"$ref":"#/components/schemas/StorefrontQuoteGiftCard"},{"type":"null"}]},"toPay":{"default":null,"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}]},"orderable":{"type":"boolean"},"refusals":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontQuoteRefusal"}}},"required":["locationId","currency","lines","productsTotal","discounts","code","fulfillment","delivery","pickup","scheduledFor","feeLines","taxLines","vat","total","giftCard","toPay","orderable","refusals"]} ``` ### StorefrontQuoteTaxLine ```json {"type":"object","properties":{"vatRatePercent":{"type":"number"},"gross":{"$ref":"#/components/schemas/MoneyAmount"},"net":{"$ref":"#/components/schemas/MoneyAmount"},"vat":{"$ref":"#/components/schemas/MoneyAmount"}},"required":["vatRatePercent","gross","net","vat"],"additionalProperties":false} ``` ### StorefrontReorderLineOutput ```json {"type":"object","properties":{"line":{"$ref":"#/components/schemas/StorefrontCartLineInputOutput"},"name":{"type":["string","null"]},"problem":{"anyOf":[{"$ref":"#/components/schemas/StorefrontCartLineProblem"},{"type":"null"}]}},"required":["line","name","problem"]} ``` ### StorefrontReorderRequest ```json {"type":"object","properties":{"locationId":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]}},"additionalProperties":false} ``` ### StorefrontReorderRequestOutput ```json {"type":"object","properties":{"locationId":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]}},"required":["locationId"]} ``` ### StorefrontReorderResponseOutput ```json {"type":"object","properties":{"locationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontReorderLineOutput"}}},"required":["locationId","lines"]} ``` ### StorefrontSession ```json {"type":"object","properties":{"token":{"type":"string","minLength":32},"expiresAt":{"type":"string"},"account":{"$ref":"#/components/schemas/CustomerAccount"}},"required":["token","expiresAt","account"],"additionalProperties":false} ``` ### StorefrontSlot ```json {"type":"object","properties":{"startsAt":{"type":"string"},"available":{"type":"boolean"}},"required":["startsAt","available"],"additionalProperties":false} ``` ### StorefrontSlotDay ```json {"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"slots":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontSlot"}}},"required":["date","slots"],"additionalProperties":false} ``` ### StorefrontSlotsQuery ```json {"type":"object","properties":{"location":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["location"],"additionalProperties":false} ``` ### StorefrontSlotsResponse ```json {"type":"object","properties":{"locationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"timeZone":{"type":"string"},"days":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontSlotDay"}}},"required":["locationId","timeZone","days"],"additionalProperties":false} ``` ### StorefrontTag ```json {"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"],"additionalProperties":false} ``` ### StorefrontUnavailableReason ```json {"type":"string","enum":["sold_out","not_offered_today","outside_hours","no_price"]} ``` ### StorefrontWeeklyHours ```json {"maxItems":70,"type":"array","items":{"$ref":"#/components/schemas/StorefrontHoursInterval"}} ``` ### UpdateCustomerAccountRequest ```json {"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120}},"required":["name"],"additionalProperties":false} ```