{"openapi":"3.1.0","info":{"title":"Apronta for assistants","version":"1.0.0","description":"Find an Apronta shop, read its hours and what it sells, see free times, book and order on a customer's behalf. No key. The customer pays and confirms through the links returned; the shop's own rules apply. The same operations are tools on the MCP server at /mcp.","contact":{"name":"Apronta","email":"ola@apronta.co","url":"https://apronta.co/docs"}},"servers":[{"url":"https://apronta.co/api/v1"}],"paths":{"/find":{"get":{"operationId":"findShop","summary":"Find a shop by its address","description":"Find an Apronta shop from a link to its page, its own domain or its slug. Use it when the customer pastes a link or names a website.","parameters":[{"name":"url","in":"query","required":true,"description":"The shop's Apronta address (https://barbearia-rui.apronta.site), its own domain (barbeariarui.pt), or its slug.","schema":{"type":"string","minLength":1,"maxLength":300}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"shop":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"trade":{"type":"string","description":"The kind of business, in English."},"town":{"type":["string","null"]},"url":{"type":"string","format":"uri","description":"The shop's own page."}},"required":["slug","name","trade","town","url"],"additionalProperties":false}},"required":["shop"],"additionalProperties":false}}}},"default":{"description":"Refused, with a code and a sentence to say.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shops":{"get":{"operationId":"searchShops","summary":"Search shops","description":"Search published Apronta shops (barbers, salons, restaurants, cafés, shops, studios) by words of their name or trade, optionally in a town. At most ten.","parameters":[{"name":"query","in":"query","required":true,"description":"Words from the shop's name or what it is: \"barbearia\", \"tasca do zé\".","schema":{"type":"string","minLength":2,"maxLength":80}},{"name":"town","in":"query","required":false,"description":"A town or neighbourhood, to narrow the search.","schema":{"type":"string","minLength":2,"maxLength":80}},{"name":"trade","in":"query","required":false,"description":"The kind of business.","schema":{"type":"string","enum":["barber_salon","beauty_wellness","restaurant_cafe","bar","shop","services","fitness_classes","other"]}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"shops":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"trade":{"type":"string","description":"The kind of business, in English."},"town":{"type":["string","null"]},"url":{"type":"string","format":"uri","description":"The shop's own page."}},"required":["slug","name","trade","town","url"],"additionalProperties":false}}},"required":["shops"],"additionalProperties":false}}}},"default":{"description":"Refused, with a code and a sentence to say.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shops/{shop}":{"get":{"operationId":"getShop","summary":"A shop's details","description":"A shop's address, phone, opening hours, whether it is open now, closures ahead, languages, currency, and whether it takes bookings, orders and AI assistants. Read it before booking or ordering.","parameters":[{"name":"shop","in":"path","required":true,"description":"The shop's Apronta slug, as find_shop or search_shops return it.","schema":{"type":"string","minLength":1,"maxLength":80}},{"name":"locale","in":"query","required":false,"description":"The language the customer speaks (pt, en, es, fr, it, de). Messages to them go in it, when the shop publishes it.","schema":{"type":"string","minLength":2,"maxLength":5}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"trade":{"type":"string"},"url":{"type":"string","format":"uri"},"phone":{"type":["string","null"]},"address":{"anyOf":[{"type":"object","properties":{"street":{"type":["string","null"]},"postcode":{"type":["string","null"]},"town":{"type":["string","null"]},"country":{"type":["string","null"]}},"required":["street","postcode","town","country"],"additionalProperties":false},{"type":"null"}]},"timezone":{"type":"string"},"currency":{"type":"string"},"languages":{"type":"array","items":{"type":"string"}},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"integer","minimum":0,"maximum":6,"description":"0 is Sunday."},"opens":{"type":"string"},"closes":{"type":"string"}},"required":["weekday","opens","closes"],"additionalProperties":false}},"today":{"type":"object","properties":{"date":{"type":"string"},"open":{"type":"boolean","description":"Open right now."},"closesAt":{"type":["string","null"]},"opensAt":{"description":"When it opens next, on `opensOn`.","type":["string","null"]},"opensOn":{"type":["string","null"]},"windows":{"type":"array","items":{"type":"object","properties":{"opens":{"type":"string"},"closes":{"type":"string"}},"required":["opens","closes"],"additionalProperties":false},"description":"Today's opening hours, closures applied."}},"required":["date","open","closesAt","opensAt","opensOn","windows"],"additionalProperties":false},"closures":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"until":{"type":"string"},"closed":{"type":"boolean"},"opens":{"type":["string","null"]},"closes":{"type":["string","null"]},"note":{"type":["string","null"]}},"required":["from","until","closed","opens","closes","note"],"additionalProperties":false},"description":"Days ahead the shop is shut or keeps other hours."},"takes":{"type":"object","properties":{"bookings":{"type":"boolean","description":"Bookings are taken now."},"orders":{"type":"boolean","description":"Orders are taken now."},"quotes":{"type":"boolean","description":"The shop answers quote requests, on its page."},"assistants":{"type":"boolean","description":"The shop takes bookings and orders from AI assistants. When false, send the customer to `url`."}},"required":["bookings","orders","quotes","assistants"],"additionalProperties":false},"booking":{"type":"object","properties":{"mode":{"type":"string","enum":["appointment","table","class"]},"maxPartySize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"people":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"People or tables a customer may ask for by name."},"confirmsByCode":{"type":"boolean","description":"The shop confirms a phone with a code: the customer finishes the booking on the shop's page."},"cancelHours":{"type":"number","description":"Up to how many hours before, a booking can be cancelled without the shop's late rule."}},"required":["mode","maxPartySize","people","confirmsByCode","cancelHours"],"additionalProperties":false},"links":{"type":"object","properties":{"book":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"order":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"quote":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["book","order","quote"],"additionalProperties":false}},"required":["slug","name","trade","url","phone","address","timezone","currency","languages","hours","today","closures","takes","booking","links"],"additionalProperties":false}}}},"default":{"description":"Refused, with a code and a sentence to say.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shops/{shop}/catalogue":{"get":{"operationId":"getCatalogue","summary":"What a shop sells","description":"The services and products a shop lists on a day, as its page does: prices, durations, descriptions, allergens as declared, option groups, the questions a service asks, and whether each is sold that day.","parameters":[{"name":"shop","in":"path","required":true,"description":"The shop's Apronta slug, as find_shop or search_shops return it.","schema":{"type":"string","minLength":1,"maxLength":80}},{"name":"date","in":"query","required":false,"description":"The day the customer wants it, on the shop's calendar. Today when left out: what is sold depends on the day.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"locale","in":"query","required":false,"description":"The language the customer speaks (pt, en, es, fr, it, de). Messages to them go in it, when the shop publishes it.","schema":{"type":"string","minLength":2,"maxLength":5}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"shop":{"type":"string"},"date":{"type":"string"},"currency":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"category":{"type":["string","null"]},"kind":{"type":"string","enum":["service","product"]},"price":{"anyOf":[{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"}},"required":["amountMinor","currency"],"additionalProperties":false},{"type":"null"}],"description":"Null when the shop gives no price, or its page does not show prices: ask on its page."},"minutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long a service takes."},"bookable":{"type":"boolean"},"orderable":{"type":"boolean"},"ways":{"type":"array","items":{"type":"string","enum":["pickup","in_venue"]},"description":"How it can be had, when orderable."},"soldOnDate":{"type":"boolean","description":"Sold on the day asked."},"weekdays":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"The only weekdays it is sold on (0 is Sunday); empty is every day."},"allergens":{"type":"array","items":{"type":"string"},"description":"As the shop declared them; check with the shop when it matters."},"optionGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"anyOf":[{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"}},"required":["amountMinor","currency"],"additionalProperties":false},{"type":"null"}],"description":"Null where the page hides the item's prices."},"minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minutes it adds."}},"required":["id","name","price","minutes"],"additionalProperties":false}}},"required":["id","name","min","max","options"],"additionalProperties":false}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"required":{"type":"boolean"}},"required":["id","question","required"],"additionalProperties":false}},"onePerOrder":{"type":"boolean"}},"required":["id","name","description","category","kind","price","minutes","bookable","orderable","ways","soldOnDate","weekdays","allergens","optionGroups","questions","onePerOrder"],"additionalProperties":false}}},"required":["shop","date","currency","items"],"additionalProperties":false}}}},"default":{"description":"Refused, with a code and a sentence to say.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shops/{shop}/availability":{"get":{"operationId":"getAvailability","summary":"Free times","description":"Free times to book one or more services (or a table) over a few days, or the times an order can be collected. Only offer the customer times this returns.","parameters":[{"name":"shop","in":"path","required":true,"description":"The shop's Apronta slug, as find_shop or search_shops return it.","schema":{"type":"string","minLength":1,"maxLength":80}},{"name":"kind","in":"query","required":false,"description":"`booking` for free appointment or table times; `pickup` for the times an order can be collected.","schema":{"default":"booking","type":"string","enum":["booking","pickup"]}},{"name":"serviceIds","in":"query","required":false,"description":"The services to book together, from get_catalogue. Leave empty for a table at a restaurant.","style":"form","explode":false,"schema":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},{"name":"optionIds","in":"query","required":false,"description":"Chosen options that change the length, from the service's option groups.","style":"form","explode":false,"schema":{"default":[],"maxItems":40,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},{"name":"partySize","in":"query","required":false,"description":"How many people.","schema":{"default":1,"type":"integer","minimum":1,"maximum":40}},{"name":"from","in":"query","required":false,"description":"The first day to look at, on the shop's calendar. Today when left out.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"days","in":"query","required":false,"description":"How many days to look at, from `from`.","schema":{"default":3,"type":"integer","minimum":1,"maximum":14}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"shop":{"type":"string"},"kind":{"type":"string","enum":["booking","pickup"]},"timezone":{"type":"string"},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"times":{"type":"array","items":{"type":"object","properties":{"startsAt":{"type":"string"},"endsAt":{"type":["string","null"]},"people":{"type":"array","items":{"type":"string"},"description":"Ids of who or what is free then."},"placesLeft":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["startsAt","endsAt","people","placesLeft"],"additionalProperties":false}}},"required":["date","times"],"additionalProperties":false}},"note":{"type":["string","null"]}},"required":["shop","kind","timezone","days","note"],"additionalProperties":false}}}},"default":{"description":"Refused, with a code and a sentence to say.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shops/{shop}/bookings":{"post":{"operationId":"createBooking","summary":"Book","description":"Book a time get_availability offered, for the customer, with their name and phone or email. The shop's own rules apply. Always give the customer the returned `link`: when the status is `awaiting_payment` or `finish_on_page`, nothing is theirs until they open it and pay or finish there. Never ask the customer for a card or a code yourself.","parameters":[{"name":"shop","in":"path","required":true,"description":"The shop's Apronta slug, as find_shop or search_shops return it.","schema":{"type":"string","minLength":1,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"serviceIds":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"The services booked, from get_catalogue. At a restaurant: dishes ordered ahead with the table, or nothing."},"optionIds":{"default":[],"maxItems":40,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"The options chosen on those services or dishes."},"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"A start time get_availability offered, exactly as it gave it."},"partySize":{"default":1,"type":"integer","minimum":1,"maximum":40},"resourceId":{"description":"A person or table the customer asked for, from get_shop's `people`. Anybody free when left out.","type":"string","minLength":1,"maxLength":64},"answers":{"default":[],"description":"Answers to the service's own questions, from get_catalogue.","maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"answer":{"type":"string","maxLength":500}},"required":["id","answer"]}},"name":{"type":"string","minLength":1,"maxLength":120,"description":"The customer's name, as they gave it."},"phone":{"description":"The customer's mobile number, with the country code. A phone or an email is needed; the phone is better.","type":"string","maxLength":40},"email":{"description":"The customer's email.","type":"string","maxLength":200,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"notes":{"description":"Anything the customer asked to tell the shop.","type":"string","maxLength":500},"locale":{"description":"The language the customer speaks (pt, en, es, fr, it, de). Messages to them go in it, when the shop publishes it.","type":"string","minLength":2,"maxLength":5}},"required":["startsAt","name"]}}}},"responses":{"201":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["confirmed","requested","awaiting_payment","finish_on_page"]},"message":{"type":"string","description":"What to tell the customer, in their language."},"link":{"type":"string","format":"uri","description":"The link for the customer: their booking (to pay, change or cancel), or the shop's page to finish it."},"token":{"description":"For get_booking and cancel_booking.","type":["string","null"]},"reference":{"type":["string","null"]},"startsAt":{"type":["string","null"]},"endsAt":{"type":["string","null"]},"payment":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["deposit","full","card"]},"amount":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"}},"required":["amountMinor","currency"],"additionalProperties":false},"payWithinMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kind","amount","payWithinMinutes"],"additionalProperties":false},{"type":"null"}],"description":"What the customer pays through `link` before the time is theirs. `card` keeps a card and takes nothing now."}},"required":["status","message","link","token","reference","startsAt","endsAt","payment"],"additionalProperties":false}}}},"default":{"description":"Refused, with a code and a sentence to say.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shops/{shop}/orders":{"post":{"operationId":"createOrder","summary":"Order","description":"Place an order for pickup or to have there, priced by the shop. When the status is `awaiting_payment`, the order goes through only once the customer pays through the returned `link`. Always give the customer the link.","parameters":[{"name":"shop","in":"path","required":true,"description":"The shop's Apronta slug, as find_shop or search_shops return it.","schema":{"type":"string","minLength":1,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","minLength":1,"maxLength":64},"qty":{"default":1,"type":"integer","minimum":1,"maximum":99},"optionIds":{"default":[],"maxItems":40,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"The options chosen on this line."}},"required":["itemId"]},"description":"What is ordered, from get_catalogue."},"fulfilment":{"type":"string","enum":["pickup","in_venue"],"description":"`pickup` to collect; `in_venue` to eat or have it there."},"pickupAt":{"description":"For pickup: a time get_availability (kind `pickup`) offered. As soon as possible when left out.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"payOnline":{"default":false,"description":"Pay on the shop's page before collecting, where the shop offers it. The customer pays through the link returned; you never handle the card.","type":"boolean"},"discountCode":{"description":"A discount code the customer gave you.","type":"string","maxLength":40},"name":{"type":"string","minLength":1,"maxLength":120,"description":"The customer's name, as they gave it."},"phone":{"description":"The customer's mobile number, with the country code. A phone or an email is needed; the phone is better.","type":"string","maxLength":40},"email":{"description":"The customer's email.","type":"string","maxLength":200,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"notes":{"description":"Anything the customer asked to tell the shop.","type":"string","maxLength":500},"locale":{"description":"The language the customer speaks (pt, en, es, fr, it, de). Messages to them go in it, when the shop publishes it.","type":"string","minLength":2,"maxLength":5}},"required":["lines","fulfilment","name"]}}}},"responses":{"201":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["placed","awaiting_payment"]},"message":{"type":"string"},"link":{"type":"string","format":"uri","description":"The order's own page: where it is paid when online, and where to follow it."},"token":{"type":"string"},"reference":{"type":"string"},"total":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"}},"required":["amountMinor","currency"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"qty":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"}},"required":["amountMinor","currency"],"additionalProperties":false},"options":{"type":"array","items":{"type":"string"}}},"required":["name","qty","unit","options"],"additionalProperties":false}},"pickupAt":{"type":["string","null"]},"payWithinMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["status","message","link","token","reference","total","lines","pickupAt","payWithinMinutes"],"additionalProperties":false}}}},"default":{"description":"Refused, with a code and a sentence to say.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/bookings/{token}":{"get":{"operationId":"getBooking","summary":"A booking, by its link","description":"Where a booking stands, by the token in its link. Only the customer's own booking: there is no other way to look one up.","parameters":[{"name":"token","in":"path","required":true,"description":"The token in the booking's link (`/r/<token>`), from create_booking or the customer's confirmation.","schema":{"type":"string","minLength":16,"maxLength":64}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"shop":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"}},"required":["slug","name"],"additionalProperties":false},"status":{"type":"string","enum":["requested","confirmed","awaiting_payment","arrived","done","cancelled","no_show"]},"reference":{"type":"string"},"startsAt":{"type":"string"},"endsAt":{"type":"string"},"partySize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"services":{"type":"array","items":{"type":"string"}},"link":{"type":"string","format":"uri"},"cancellable":{"type":"boolean"}},"required":["shop","status","reference","startsAt","endsAt","partySize","services","link","cancellable"],"additionalProperties":false}}}},"default":{"description":"Refused, with a code and a sentence to say.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/bookings/{token}/cancel":{"post":{"operationId":"cancelBooking","summary":"Cancel a booking","description":"Cancel the customer's booking, by the token in its link, when they ask to. When cancelling now would cost money under the shop's rule, nothing is cancelled and the customer is sent to the link to see the fee and cancel there.","parameters":[{"name":"token","in":"path","required":true,"description":"The token in the booking's link (`/r/<token>`), from create_booking or the customer's confirmation.","schema":{"type":"string","minLength":16,"maxLength":64}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["cancelled","finish_on_page"]},"message":{"type":"string"},"link":{"type":"string","format":"uri"}},"required":["status","message","link"],"additionalProperties":false}}}},"default":{"description":"Refused, with a code and a sentence to say.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/{token}":{"get":{"operationId":"getOrder","summary":"An order, by its link","description":"Where an order stands (awaiting payment, paid, being made, ready), by the token in its link.","parameters":[{"name":"token","in":"path","required":true,"description":"The token in the order's link (`/p/<token>`), from create_order or the customer's receipt.","schema":{"type":"string","minLength":16,"maxLength":64}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"shop":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"}},"required":["slug","name"],"additionalProperties":false},"status":{"type":"string","enum":["awaiting_payment","pay_at_venue","paid","fulfilled","refunded","cancelled"]},"stage":{"type":"string","enum":["new","preparing","ready","done"]},"reference":{"type":"string"},"total":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"}},"required":["amountMinor","currency"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"qty":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","qty"],"additionalProperties":false}},"pickupAt":{"type":["string","null"]},"link":{"type":"string","format":"uri"}},"required":["shop","status","stage","reference","total","lines","pickupAt","link"],"additionalProperties":false}}}},"default":{"description":"Refused, with a code and a sentence to say.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","enum":["bad_request","not_found","closed","unavailable","bad_details","too_many","not_for_assistants","failed"]},"message":{"type":"string"},"nextTime":{"description":"The next free time, when the one asked for has gone.","type":["string","null"]},"link":{"description":"Where the customer can do it themselves.","anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"retryAfter":{"description":"Seconds to wait, after too_many.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["error","message"],"additionalProperties":false}}}}