{"components":{"schemas":{"AddGiftCard":{"description":"A gift card to pay with.","properties":{"code":{"description":"The code on the card, in any case, with or without dashes.","type":"string"}},"required":["code"],"type":"object"},"ApplicationInput":{"description":"What the storefront's form sends.","properties":{"city":{"type":["string","null"]},"cnpj":{"description":"A valid CNPJ, punctuation allowed.","type":"string"},"company_name":{"description":"Razão social, 1 to 160 characters.","type":"string"},"complement":{"type":["string","null"]},"contact_name":{"description":"Who to talk to, 1 to 120 characters.","type":"string"},"email":{"type":"string"},"ie_exempt":{"type":"boolean"},"message":{"description":"Anything else, up to 2000 characters.","type":["string","null"]},"neighborhood":{"type":["string","null"]},"number":{"type":["string","null"]},"phone":{"type":["string","null"]},"postal_code":{"description":"CEP.","type":["string","null"]},"sales_channels":{"description":"How the business sells; at least one.","items":{"$ref":"#/components/schemas/SalesChannel"},"type":"array"},"state":{"description":"UF, two letters.","type":["string","null"]},"state_registration":{"description":"The state registration (IE); leave it out with `ie_exempt`.","type":["string","null"]},"street":{"type":["string","null"]},"trade_name":{"type":["string","null"]}},"required":["company_name","cnpj","contact_name","email"],"type":"object"},"ApplicationReceived":{"description":"What the storefront answers.","properties":{"id":{"format":"uuid","type":"string"},"message":{"description":"What to tell the business, in Portuguese.","type":"string"},"status":{"$ref":"#/components/schemas/ApplicationStatus","description":"Always `pending` here."}},"required":["id","status","message"],"type":"object"},"ApplicationStatus":{"description":"Where a request stands.","enum":["pending","approved","rejected"],"type":"string"},"AppliedPromotion":{"description":"A promotion the cart got.","properties":{"amount_cents":{"format":"int64","type":"integer"},"id":{"description":"The automatic discount's id.","format":"uuid","type":"string"},"kind":{"description":"`buy_x_get_y`, `tiered` or `bundle`.","type":"string"},"name":{"type":"string"}},"required":["id","name","kind","amount_cents"],"type":"object"},"AppliedShippingRule":{"description":"The rule that changed an option, as the quote and the order keep it.","properties":{"action":{"description":"The action's `kind`.","type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name","action"],"type":"object"},"Availability":{"description":"Whether and how a variant can be bought. Clients must tolerate new values.","enum":["in_stock","preorder","out_of_stock"],"type":"string"},"BillingAddress":{"description":"A billing address, in the parts of the delivery address.","properties":{"additional_info":{"description":"The complement.","type":["string","null"]},"city":{"type":["string","null"]},"neighborhood":{"type":["string","null"]},"number":{"type":["string","null"]},"state":{"description":"Two-letter state (UF).","type":["string","null"]},"street":{"type":["string","null"]},"zip_code":{"description":"CEP, 8 digits (formatting ignored).","type":["string","null"]}},"type":"object"},"BoletoDetails":{"description":"What a boleto gives the shopper to pay it, as stored under `boleto` in a\npayment's snapshot and answered to the storefront.","properties":{"barcode":{"description":"The barcode's 44 digits.","type":["string","null"]},"digitable_line":{"description":"The linha digitável (47 digits), to type or paste in a bank app.","type":["string","null"]},"due_date":{"description":"When the boleto is due (`YYYY-MM-DD`).","format":"date","type":["string","null"]},"pix_code":{"description":"A Pix \"copia e cola\" code that pays the same boleto, when the gateway\nissues one (Asaas with a Pix key, Banco Inter's Bolepix).","type":["string","null"]},"pix_qr_base64":{"description":"That Pix as a QR code, a PNG in base64.","type":["string","null"]},"url":{"description":"The boleto to print or save (a PDF or the gateway's page).","type":["string","null"]}},"type":"object"},"BookRequest":{"properties":{"client_email":{"description":"An e-mail or a phone is required; the e-mail gets the confirmation.","type":["string","null"]},"client_name":{"type":"string"},"client_phone":{"type":["string","null"]},"consent":{"description":"Agreement to `consent_text`, needed to answer a sensitive service.","type":"boolean"},"intake":{"description":"Answers to the service's `intake_questions`.","items":{"$ref":"#/components/schemas/IntakeAnswerInput"},"type":"array"},"invite":{"description":"The `convite` of a personal booking link the store sent: the booking\nbecomes a meeting in its CRM. An unknown or expired one is ignored.","type":["string","null"]},"notes":{"type":["string","null"]},"package_code":{"description":"A package's code: the session comes out of it, with no deposit.","type":["string","null"]},"provider_id":{"description":"Empty: whoever is free.","format":"uuid","type":["string","null"]},"service_id":{"format":"uuid","type":"string"},"starts_at":{"description":"One of the `starts_at` values the availability call returned.","format":"date-time","type":"string"}},"required":["service_id","starts_at","client_name"],"type":"object"},"Booked":{"description":"A new booking and the private link to manage it.","properties":{"booking":{"$ref":"#/components/schemas/PublicBooking"},"manage_url":{"description":"The hosted page for the same.","type":"string"},"payment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PixToPay","description":"When the service asks a deposit: the Pix to pay within about 30\nminutes, or the time is released."}]},"token":{"description":"Keep it: it is the only key to see, move or cancel the booking.","type":"string"}},"required":["booking","token","manage_url"],"type":"object"},"BookingPage":{"description":"The booking page's content.","properties":{"brand":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PageBrand"}]},"consent_text":{"description":"What the consent box says for a sensitive service.","type":"string"},"package_plans":{"description":"Packages of sessions for sale (paid by Pix).","items":{"$ref":"#/components/schemas/PublicPackagePlan"},"type":"array"},"services":{"items":{"$ref":"#/components/schemas/PublicService"},"type":"array"},"store_name":{"type":"string"},"waitlist_enabled":{"description":"A client who finds no time can join the waitlist for a day.","type":"boolean"}},"required":["store_name","services","package_plans","waitlist_enabled","consent_text"],"type":"object"},"BookingSlot":{"description":"One start time on offer.","properties":{"provider_id":{"description":"The provider who would take it.","format":"uuid","type":"string"},"seats_left":{"description":"For a class: the seats still free at this start.","format":"int32","type":["integer","null"]},"starts_at":{"format":"date-time","type":"string"}},"required":["starts_at","provider_id"],"type":"object"},"BuyPackage":{"description":"A client buying a package.","properties":{"client_email":{"description":"Required: the code is e-mailed once paid.","type":["string","null"]},"client_name":{"type":"string"},"client_phone":{"type":["string","null"]},"plan_id":{"format":"uuid","type":"string"}},"required":["plan_id","client_name"],"type":"object"},"CancelMyBooking":{"description":"Why the customer cancels.","properties":{"reason":{"type":["string","null"]}},"type":"object"},"CartCredit":{"description":"What credit would pay on a cart.","properties":{"credit_cents":{"description":"Credit the cart would use.","format":"int64","type":"integer"},"parts":{"items":{"$ref":"#/components/schemas/CartCreditPart"},"type":"array"},"payable_cents":{"description":"What is left to pay by Pix or card. Final once a payment method is\nchosen: a method discount lowers the total, and credit adjusts to it.","format":"int64","type":"integer"},"total_cents":{"description":"The cart's total, before credit.","format":"int64","type":"integer"},"wallet":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CartWallet","description":"The signed-in customer's wallet, when they have a balance to offer."}]}},"required":["parts","credit_cents","total_cents","payable_cents"],"type":"object"},"CartCreditPart":{"description":"One account a cart pays with.","properties":{"account_id":{"format":"uuid","type":"string"},"balance_cents":{"description":"What the account holds.","format":"int64","type":"integer"},"code_hint":{"description":"\"••••-••••-••••-PQRS\" for a gift card.","type":["string","null"]},"kind":{"description":"`wallet` or `gift_card`.","type":"string"},"use_cents":{"description":"What this cart would take from it.","format":"int64","type":"integer"}},"required":["account_id","kind","balance_cents","use_cents"],"type":"object"},"CartReferral":{"description":"The referral a cart carries.","properties":{"applied":{"description":"Whether the cart has a referral code.","type":"boolean"},"enabled":{"description":"Whether the store runs referrals: when false, offer no code field.","type":"boolean"},"min_order_cents":{"description":"The order must reach this (paid with money, before freight) to count.","format":"int64","type":"integer"},"pending_days":{"description":"Days after payment before the credit arrives.","format":"int32","type":"integer"},"referrer_first_name":{"description":"The first name of who referred, to say whose code it is.","type":["string","null"]},"reward_cents":{"description":"Credit the shopper gets after this first order, in cents.","format":"int64","type":"integer"}},"required":["enabled","applied","reward_cents","min_order_cents","pending_days"],"type":"object"},"CartWallet":{"properties":{"account_id":{"format":"uuid","type":"string"},"balance_cents":{"format":"int64","type":"integer"},"selected":{"description":"Whether the cart uses it.","type":"boolean"}},"required":["account_id","balance_cents","selected"],"type":"object"},"CashbackBalance":{"description":"A customer's cashback.","properties":{"next_release_at":{"description":"When the next waiting amount reaches the wallet.","format":"date-time","type":["string","null"]},"owed_cents":{"description":"What refunds took back that the wallet could not cover, in cents: the\nnext cashback pays it first.","format":"int64","type":"integer"},"pending_cents":{"description":"Waiting for its orders to stand, in cents.","format":"int64","type":"integer"},"released_cents":{"description":"What reached the wallet in all, net of what refunds took back, in cents.","format":"int64","type":"integer"}},"required":["pending_cents","released_cents","owed_cents"],"type":"object"},"Category":{"description":"A product category.","properties":{"description":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"image":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CoverImage"}]},"name":{"type":"string"},"parent_slug":{"description":"Slug of the parent category; null for a top-level one.","type":["string","null"]},"product_count":{"description":"Visible products directly in this category (not in its children).","format":"int64","type":"integer"},"slug":{"type":"string"}},"required":["id","slug","name","product_count"],"type":"object"},"ChannelOrder":{"description":"The order the channel created.","properties":{"currency":{"description":"ISO 4217 code of the amounts.","type":"string"},"discount_cents":{"format":"int64","type":"integer"},"id":{"format":"uuid","type":"string"},"shipping_cents":{"format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/ChannelOrderStatus"},"subtotal_cents":{"format":"int64","type":"integer"},"total_cents":{"format":"int64","type":"integer"}},"required":["id","status","subtotal_cents","discount_cents","shipping_cents","total_cents","currency"],"type":"object"},"ChannelOrderAddress":{"description":"The delivery address, kept with the order.","properties":{"city":{"type":["string","null"]},"complement":{"type":["string","null"]},"district":{"type":["string","null"]},"number":{"type":["string","null"]},"postal_code":{"description":"CEP, digits only.","type":["string","null"]},"state":{"description":"UF, two letters.","type":["string","null"]},"street":{"type":["string","null"]}},"type":"object"},"ChannelOrderContact":{"description":"Who is buying. The customer is found by e-mail or phone, or created.","properties":{"email":{"type":["string","null"]},"name":{"type":["string","null"]},"phone":{"type":["string","null"]}},"type":"object"},"ChannelOrderLine":{"description":"One line of the order.","properties":{"product_id":{"format":"uuid","type":"string"},"quantity":{"description":"Units, 1 or more. Defaults to 1.","format":"int32","minimum":1,"type":["integer","null"]},"unit_price_cents":{"description":"What the channel charged per unit, in cents. Defaults to the price\nthe catalog charges today (the promotional one while it is on).","format":"int64","minimum":0,"type":["integer","null"]},"variant_id":{"description":"The variant bought. Defaults to the product's first active variant.","format":"uuid","type":["string","null"]}},"required":["product_id"],"type":"object"},"ChannelOrderRequest":{"description":"An order placed on the sales channel.","properties":{"address":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ChannelOrderAddress"}]},"contact":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ChannelOrderContact"}]},"discount_rate":{"description":"Discount as a fraction of the subtotal, from 0 to 1 (`0.1` is 10%).","format":"double","maximum":1,"minimum":0,"type":["number","null"]},"items":{"description":"The lines bought. At least one must be an active product of the store.","items":{"$ref":"#/components/schemas/ChannelOrderLine"},"type":"array"},"payment_method":{"description":"How the buyer paid on the channel, kept as a note on the order.","type":["string","null"]},"shipping":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ChannelOrderShipping"}]},"shipping_method":{"description":"The shipping method chosen on the channel, kept as a note on the order.","type":["string","null"]}},"required":["items"],"type":"object"},"ChannelOrderShipping":{"description":"What the channel charged for delivery.","properties":{"carrier":{"type":["string","null"]},"delivery_days":{"description":"Estimated delivery time in days.","format":"int32","type":["integer","null"]},"price_cents":{"description":"Shipping charged to the buyer, in cents. Defaults to 0.","format":"int64","minimum":0,"type":["integer","null"]},"service_type":{"type":["string","null"]}},"type":"object"},"ChannelOrderStatus":{"description":"Where a channel order starts.","enum":["pending"],"type":"string"},"ClientCancel":{"properties":{"reason":{"type":["string","null"]}},"type":"object"},"ClientReschedule":{"properties":{"starts_at":{"format":"date-time","type":"string"}},"required":["starts_at"],"type":"object"},"CnpjLookup":{"properties":{"active":{"type":"boolean"},"cep":{"type":["string","null"]},"city_code":{"description":"IBGE municipality code.","type":["string","null"]},"city_name":{"type":["string","null"]},"cnae":{"description":"Main CNAE, 7 digits.","type":["string","null"]},"cnpj":{"type":"string"},"complement":{"type":["string","null"]},"crt":{"description":"`simples_nacional` or `mei` when the open data says the company\nopted in; null when it does not say (it reports only opt-ins).","type":["string","null"]},"district":{"type":["string","null"]},"legal_name":{"type":"string"},"number":{"type":["string","null"]},"phone":{"type":["string","null"]},"status":{"description":"Receita's registration status, e.g. \"ATIVA\".","type":["string","null"]},"street":{"type":["string","null"]},"trade_name":{"type":["string","null"]},"uf":{"type":["string","null"]}},"required":["cnpj","legal_name","active"],"type":"object"},"Collection":{"description":"A curated collection of products.","properties":{"description":{"type":["string","null"]},"handle":{"description":"The handle `GET /storefront/products?collection=` takes.","type":"string"},"id":{"format":"uuid","type":"string"},"image":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CoverImage"}]},"name":{"type":"string"},"product_count":{"description":"Visible products in the collection.","format":"int64","type":"integer"}},"required":["id","handle","name","product_count"],"type":"object"},"ConversationCampaignCard":{"description":"What a campaign card shows.","properties":{"ends_at":{"description":"When the campaign ends (discounts with an end date).","format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"image":{"type":["string","null"]},"kind":{"description":"`discount` (an automatic discount) or `collection`.","type":"string"},"subtitle":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"required":["kind","id","title","subtitle","url"],"type":"object"},"ConversationCart":{"description":"The assisted-sale cart of a conversation: what the team, the bot and the\ncontact all see, paid through `url`.","properties":{"cart_id":{"format":"uuid","type":"string"},"currency":{"type":"string"},"discount_cents":{"format":"int64","type":"integer"},"discount_code":{"description":"The discount code on the cart, when the discount came from one.","type":["string","null"]},"discount_expires_at":{"description":"An expiring offer: after this instant the cart drops its discount\nand the link charges full price. Stays set once passed (the\ndiscount is then 0), so clients can say the offer expired.","format":"date-time","type":["string","null"]},"expires_at":{"description":"When the link stops working.","format":"date-time","type":["string","null"]},"freight_change":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationCartFreightChange","description":"Only in the answer to a change of the items, when a freight had been\nchosen: whether it was chosen again or left the cart."}]},"item_count":{"format":"int32","type":"integer"},"items":{"items":{"$ref":"#/components/schemas/ConversationCartItem"},"type":"array"},"offer_deadline":{"description":"The deadline as the customer reads it, in the store's time zone\n(\"20/10 às 18:00\"); null without one or once passed.","type":["string","null"]},"order_id":{"format":"uuid","type":["string","null"]},"order_number":{"type":["string","null"]},"paid":{"description":"The order is paid.","type":"boolean"},"pending_discount":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationDiscountApproval","description":"A discount above the store's cap waiting for approval: until it is\ndecided the cart cannot be sent or charged."}]},"pricing":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PricedCart","description":"What each payment method costs (PIX with its discount, card with its\ninstallments), from the same pricing the charge uses."}]},"shipping_cents":{"format":"int64","type":"integer"},"status":{"description":"`open`, `converted` (an order was created), `abandoned` or `expired`.","type":"string"},"subtotal_cents":{"format":"int64","type":"integer"},"total_cents":{"format":"int64","type":"integer"},"url":{"description":"The payment link to send the contact.","type":["string","null"]}},"required":["cart_id","status","currency","item_count","subtotal_cents","discount_cents","shipping_cents","total_cents","paid","items"],"type":"object"},"ConversationCartFreightChange":{"description":"What happened to the cart's freight when its items changed.","properties":{"carrier":{"type":["string","null"]},"cep":{"description":"The CEP quoted (digits).","type":"string"},"from_cents":{"description":"What the freight cost before the change.","format":"int64","type":"integer"},"service":{"type":"string"},"status":{"description":"`kept`: the cart was quoted again at its CEP and the same service\nchosen (its price may have changed: `from_cents` and `to_cents`).\n`cleared`: it could not be chosen again (no longer offered, or the\ncarriers did not answer); the cart has no freight until one is chosen.","type":"string"},"to_cents":{"description":"What it costs now; null when cleared.","format":"int64","type":["integer","null"]}},"required":["status","cep","service","from_cents"],"type":"object"},"ConversationCartItem":{"properties":{"image":{"type":["string","null"]},"product_id":{"format":"uuid","type":"string"},"quantity":{"format":"int32","type":"integer"},"sku":{"type":["string","null"]},"title":{"type":"string"},"total_cents":{"format":"int64","type":"integer"},"unit_price_cents":{"format":"int64","type":"integer"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","product_id","title","quantity","unit_price_cents","total_cents"],"type":"object"},"ConversationDiscountApproval":{"description":"A discount above the cap, waiting for (or after) a decision.","properties":{"cap_pct":{"description":"The store's cap then, whole percent.","format":"int32","type":"integer"},"cart_id":{"format":"uuid","type":"string"},"code":{"description":"An existing code; null for a single-use code created on approval\n(or a plain cart discount).","type":["string","null"]},"contact_name":{"type":["string","null"]},"conversation_id":{"format":"uuid","type":"string"},"created_at":{"format":"date-time","type":"string"},"decided_at":{"format":"date-time","type":["string","null"]},"decided_by":{"format":"uuid","type":["string","null"]},"decided_via":{"description":"`app` or `link`.","type":["string","null"]},"discount_cents":{"description":"The amount asked for (fixed discounts).","format":"int64","type":["integer","null"]},"discount_code_id":{"description":"The existing code's id.","format":"uuid","type":["string","null"]},"discount_pct_bp":{"description":"The share asked for, in basis points (percentage discounts).","format":"int32","type":["integer","null"]},"effective_pct_bp":{"description":"Share of the goods it takes off, basis points, when requested.","format":"int32","type":"integer"},"id":{"format":"uuid","type":"string"},"kind":{"description":"`cart_discount` or `code`.","type":"string"},"note":{"type":["string","null"]},"offer_expires_at":{"description":"When the offer ends once applied.","format":"date-time","type":["string","null"]},"requested_by":{"format":"uuid","type":"string"},"requested_by_name":{"type":["string","null"]},"status":{"description":"`pending`, `approved`, `rejected` or `cancelled` (replaced by\nanother request, or the discount was cleared).","type":"string"},"subtotal_cents":{"format":"int64","type":"integer"}},"required":["id","conversation_id","cart_id","requested_by","kind","effective_pct_bp","cap_pct","subtotal_cents","status","created_at"],"type":"object"},"ConversationFreightOption":{"description":"A shipping option for the cart.","properties":{"carrier":{"type":["string","null"]},"delivery_days":{"format":"int64","type":["integer","null"]},"name":{"type":["string","null"]},"option_id":{"description":"Pass back as `option_id` to select it.","type":["string","null"]},"price":{"description":"Formatted (\"R$ 29,90\").","type":"string"},"price_cents":{"format":"int64","type":"integer"}},"required":["price_cents","price"],"type":"object"},"ConversationMessagePayload":{"description":"The documented keys of a message `payload`. All optional; others may appear.","properties":{"assignee_user_id":{"description":"System `assignment` messages: the new assignee (null when unassigned).","format":"uuid","type":["string","null"]},"attachments":{"description":"Attachment metadata as the channel sent it. Use the message's\n`attachments` for download URLs.","items":{"type":"object"},"type":["array","null"]},"campaign":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationCampaignCard","description":"A campaign card: render it with its link."}]},"cart":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationCart","description":"Assisted-sale cart snapshot: render a cart card with its payment link."}]},"contacts":{"description":"Contact cards the customer shared: `name`, `phones`, `emails`.","items":{"type":"object"},"type":["array","null"]},"echo":{"description":"Sent by the team from the WhatsApp Business app on the same number.","type":["boolean","null"]},"email":{"description":"E-mail messages: subject, sender, sanitized HTML body, attachments.","type":["object","null"]},"freight_cep":{"description":"The CEP those options were quoted for (digits).","type":["string","null"]},"freight_options":{"description":"Shipping options the team offered (`POST .../cart/freight/send`).","items":{"$ref":"#/components/schemas/ConversationFreightOption"},"type":["array","null"]},"interactive":{"description":"The contact tapped a button instead of typing.","type":["boolean","null"]},"kind":{"description":"System messages: `assignment`, `handover`, `resolved` or `payment`.","type":["string","null"]},"location":{"description":"WhatsApp location messages: `latitude`, `longitude`, `name`, `address`.","type":["object","null"]},"order":{"description":"A WhatsApp catalog order: `catalog_id` and `items` (`variant_id`,\n`title`, `quantity`, `item_price`, `currency`). Its items also go to\nthe conversation's cart.","type":["object","null"]},"paid_order_id":{"description":"The bot's payment confirmation: the paid order.","type":["string","null"]},"pix":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationPixCharge","description":"A PIX charge created from the cart: render the QR code."}]},"pix_code":{"description":"True on the follow-up message that carries only the PIX copy-and-paste code.","type":["boolean","null"]},"product_format":{"description":"How `products` were sent (`POST .../products`): `whatsapp_catalog`,\n`whatsapp_card`, `instagram_carousel`, `email_list` or `card`.","type":["string","null"]},"products":{"description":"Product cards the bot suggested or a teammate sent.","items":{"$ref":"#/components/schemas/ConversationProductCard"},"type":["array","null"]},"quick_replies":{"description":"Up to three suggested answers, shown as buttons.","items":{"type":"string"},"type":["array","null"]},"quick_reply_ids":{"description":"Ids of the `quick_replies` buttons, when they are not `qr_<n>`\n(`freight:<option_id>` selects that freight when tapped).","items":{"type":"string"},"type":["array","null"]},"reactions":{"description":"Reactions: `by` is `visitor`, `business_app` or a team member's id.","items":{"type":"object"},"type":["array","null"]},"reason":{"description":"System `handover` messages: why the bot handed over.","type":["string","null"]},"referral":{"description":"The ad or post the contact tapped to send this message, as the\nchannel sent it. WhatsApp: `source_type` (`ad` or `post`),\n`source_url`, `headline`, `body`, `image_url`, `thumbnail_url`.\nInstagram: `ad_id` and `ads_context_data` (`ad_title`, `photo_url`).","type":["object","null"]},"reply_to":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationMessageReplyRef","description":"The message this one answers."}]},"story":{"description":"Instagram: the story a reply answers (`url`, `id`).","type":["object","null"]},"template":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationMessageTemplate","description":"A WhatsApp template the team sent; the message `text` is its body\nwith the variables filled in."}]},"unsent":{"description":"Unsent on Instagram: its text and files were removed, and `text` says\nso in Portuguese. The only key left.","type":["boolean","null"]}},"type":"object"},"ConversationMessageReplyRef":{"description":"The message a reply answers, as shown above it.","properties":{"external_id":{"description":"Its WhatsApp id, when it has one.","type":["string","null"]},"image_index":{"description":"The index of its first image attachment, when it has one: the quote\nshows `.../messages/{message_id}/attachments/{image_index}`.","format":"int32","type":["integer","null"]},"media_index":{"description":"Its first photo or video (`media_kind` `image`, `sticker` or\n`video`), at `.../messages/{message_id}/attachments/{media_index}`.","format":"int32","type":["integer","null"]},"media_kind":{"type":["string","null"]},"message_id":{"format":"uuid","type":"string"},"sender":{"type":"string"},"text":{"description":"Preview of its text.","type":"string"}},"required":["message_id","sender","text"],"type":"object"},"ConversationMessageSender":{"description":"Who wrote a message. `visitor` is the contact (the customer, on any\nchannel), `agent` a team member, `bot` the store's AI agent, `system` an\nevent line (assignment, hand-over, resolution).","enum":["visitor","agent","bot","system"],"type":"string"},"ConversationMessageTemplate":{"description":"The WhatsApp template behind a message.","properties":{"buttons":{"description":"Button labels.","items":{"type":"string"},"type":"array"},"footer":{"type":["string","null"]},"header":{"description":"Text header with its variable filled in.","type":["string","null"]},"header_media":{"description":"Media header: `kind` (`image`, `video`, `document`) and `url`.","type":["object","null"]},"id":{"format":"uuid","type":"string"},"language":{"type":"string"},"name":{"type":"string"}},"required":["id","name","language","buttons"],"type":"object"},"ConversationPixCharge":{"description":"A PIX charge for the order created from the cart.","properties":{"amount":{"description":"Formatted (\"R$ 129,90\").","type":"string"},"amount_cents":{"format":"int64","type":"integer"},"cart":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationCart","description":"The cart the order came from. Absent in the bot's PIX messages."}]},"copy_paste":{"description":"The PIX copy-and-paste code.","type":["string","null"]},"expires_at":{"format":"date-time","type":["string","null"]},"order_id":{"format":"uuid","type":"string"},"order_number":{"type":"string"},"qr_code_base64":{"description":"PNG of the QR code, base64.","type":["string","null"]}},"required":["order_id","order_number","amount_cents","amount"],"type":"object"},"ConversationProductCard":{"description":"A product card inside a bot message.","properties":{"compare_at":{"description":"Formatted original price when on promotion.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"image":{"type":["string","null"]},"price":{"description":"Formatted price (\"R$ 129,90\"); empty while the assistant is not\nshowing prices yet (early in a conversation).","type":"string"},"title":{"type":"string"},"url":{"description":"Product page on the storefront.","type":"string"},"variant_id":{"description":"The variant the price is for (the Meta catalog item id).","format":"uuid","type":["string","null"]}},"required":["id","title","price","url"],"type":"object"},"ConversationStatus":{"description":"Where a conversation stands. `open`: someone should answer; `pending`:\nthe bot handed over and nobody took it yet; `snoozed`: hidden until its\nsnooze ends (a new customer message wakes it); `resolved`: closed\n(a new customer message reopens it).","enum":["open","pending","snoozed","resolved"],"type":"string"},"CoverImage":{"description":"A picture standing in for a category or a collection (its first\nproduct's main image).","properties":{"alt":{"type":["string","null"]},"sizes":{"description":"`url` first, followed by its resized renditions.","items":{"type":"string"},"type":"array"},"url":{"type":"string"}},"required":["url","sizes"],"type":"object"},"DiscountCodeRejection":{"description":"Why a code does not apply.","type":"string","x-extensible-enum":["not_found","not_started","expired","below_minimum","usage_limit_reached","no_eligible_items","below_minimum_quantity","first_purchase_only","already_used","not_eligible_customer","not_combinable"]},"EarnRates":{"description":"What a purchase earns a customer now: the program's rates at their tier.","properties":{"cashback_bps":{"description":"Cashback at this tier, in basis points of what is paid with money for\ngoods; 0 with cashback off.","format":"int32","type":"integer"},"cashback_enabled":{"type":"boolean"},"multiplier_bps":{"description":"The tier's points multiplier (10000 is 1x).","format":"int32","type":"integer"},"pending_days":{"description":"Days after payment before what a purchase earns counts.","format":"int32","type":"integer"},"points_enabled":{"type":"boolean"},"points_per_currency_unit":{"description":"Points per R$ 1,00, before the tier.","format":"int32","type":"integer"},"tier":{"description":"The tier these rates are for; empty below the lowest or without tiers.","type":["string","null"]}},"required":["points_enabled","cashback_enabled","points_per_currency_unit","multiplier_bps","cashback_bps","pending_days"],"type":"object"},"ErrorResponse":{"description":"Canonical error body. Every error response from the API has this shape,\nwhatever produced it: handlers that build an [`ApiError`], the older\nhelpers below, bare status codes and axum's own rejections (the last two\nare rewritten by `common::api::normalize_errors`).\n\n`error` stays the human-readable message so consumers written against\nthe original `{\"error\": \"...\"}` body keep working; `code` is the stable,\nmachine-readable part clients should branch on.","properties":{"code":{"description":"Stable snake_case identifier for the failure, e.g. `not_found`,\n`validation_failed`, `discount_code_expired`.","example":"not_found","type":"string"},"details":{"description":"Structured context for the failure, such as per-field validation\nmessages. Shape depends on `code`.","type":["object","null"]},"error":{"description":"Human-readable message. Wording may change; do not match on it.","example":"Order not found","type":"string"}},"required":["error","code"],"type":"object"},"ExchangeOption":{"description":"A variant the customer can get in exchange.","properties":{"available":{"description":"There is stock, or it is made to order.","type":"boolean"},"sku":{"type":["string","null"]},"title":{"type":"string"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","title","available"],"type":"object"},"ExpiringCredit":{"description":"Wallet credit that expires, with what is left of it.","properties":{"amount_cents":{"description":"What was given.","format":"int64","type":"integer"},"entry_id":{"format":"uuid","type":"string"},"expires_at":{"format":"date-time","type":"string"},"kind":{"description":"The entry that brought it: `cashback`, `issue` (a bonus) or `adjust`\n(an import or a correction).","type":"string"},"left_cents":{"description":"What is left of it to spend: spending takes what expires first.","format":"int64","type":"integer"},"note":{"type":["string","null"]}},"required":["entry_id","kind","amount_cents","left_cents","expires_at"],"type":"object"},"FacetPriceRange":{"description":"A range of prices in cents.","properties":{"max_cents":{"format":"int64","type":"integer"},"min_cents":{"format":"int64","type":"integer"}},"required":["min_cents","max_cents"],"type":"object"},"FacetValue":{"description":"A value of a facet and how many products choosing it would list.","properties":{"color_hex":{"description":"`#rrggbb` of a colour value: its own colour, else the store's swatch\npalette entry for that value; null otherwise.","type":["string","null"]},"count":{"description":"Products the list would hold with this value added to its filter, the\nother filters kept.","format":"int64","type":"integer"},"value":{"description":"The value as the products spell it (send it back as is).","type":"string"}},"required":["value","count"],"type":"object"},"FreeShippingProgress":{"description":"What the cart still needs for free shipping.","properties":{"qualifies":{"type":"boolean"},"remaining_cents":{"description":"How much more the subtotal needs; 0 once it qualifies.","format":"int64","type":"integer"},"threshold_cents":{"description":"The lowest subtotal (after discounts) at which a free-shipping rule applies to this cart.","format":"int64","type":"integer"}},"required":["threshold_cents","remaining_cents","qualifies"],"type":"object"},"FulfillmentMethod":{"description":"How the order reaches the shopper.","enum":["shipping","pickup"],"type":"string"},"GiftCardDetails":{"description":"Who a gift card is for, as the buyer typed it.","properties":{"deliver_on":{"description":"The day it is e-mailed, at 08:00 São Paulo time. Empty: right after payment.","format":"date","type":["string","null"]},"message":{"type":["string","null"]},"recipient_email":{"description":"Where the code is sent. Empty: to the buyer, who hands it over.","type":["string","null"]},"recipient_name":{"type":["string","null"]},"sender_name":{"description":"Who the card is from, as the recipient reads it.","type":["string","null"]}},"type":"object"},"ImageKind":{"description":"What kind of picture an image is.","enum":["gallery","measurement"],"type":"string"},"IntakeAnswerInput":{"description":"A client's answer to one question.","properties":{"question_id":{"type":"string"},"value":{"description":"The text; for `choice` one of the options; for `yes_no` `yes` or `no`.","type":"string"}},"required":["question_id","value"],"type":"object"},"IntakeQuestion":{"description":"One question of a service's form.","properties":{"id":{"description":"Stable id the answers refer to. Left out on a new question, it is made.","type":"string"},"kind":{"description":"`text` (one line), `long_text`, `choice` (one of `options`) or `yes_no`.","type":"string"},"label":{"type":"string"},"options":{"items":{"type":"string"},"type":"array"},"required":{"type":"boolean"}},"required":["label","kind"],"type":"object"},"JoinWaitlist":{"description":"What a client asks to wait for.","properties":{"client_email":{"description":"An e-mail or a phone is required; only an e-mail is told by itself.","type":["string","null"]},"client_name":{"type":"string"},"client_phone":{"type":["string","null"]},"day":{"description":"`YYYY-MM-DD`, today or later.","format":"date","type":"string"},"provider_id":{"description":"Empty: anyone who delivers the service.","format":"uuid","type":["string","null"]},"service_id":{"format":"uuid","type":"string"}},"required":["service_id","day","client_name"],"type":"object"},"LoyaltyTier":{"description":"A level of the program: what a customer spends in the program's window to\nreach it, how much faster they earn from then on, and its perks.","properties":{"birthday_bonus_cents":{"description":"Store credit given on the customer's birthday, in cents (0: none).","format":"int64","type":"integer"},"birthday_bonus_points":{"description":"Points given on the customer's birthday (0: none).","format":"int32","type":"integer"},"cashback_bps":{"description":"Cashback percent in this tier, in basis points (0 to 5000). Empty: the\nprogram's `cashback_bps`.","format":"int32","type":["integer","null"]},"free_shipping":{"description":"Shipping rules can give this tier free shipping\n(`loyalty_customer_tiers.free_shipping`).","type":"boolean"},"min_spend_cents":{"description":"Paid with money for goods (no freight, no credit) in the last\n`tier_window_months`. The lowest tier may start at zero (every\ncustomer is in it).","format":"int64","type":"integer"},"multiplier_bps":{"description":"Points multiplier: 10000 is 1x, 15000 is 1,5x; 10000 to 50000.","format":"int32","type":"integer"},"name":{"type":"string"}},"required":["name","min_spend_cents","multiplier_bps"],"type":"object"},"MessageDeliveryStatus":{"description":"Delivery of an outbound (agent or bot) message. On WhatsApp it follows\nMeta's status callbacks: `sent` (accepted), `delivered` (on the phone),\n`read`, or `failed` with `delivery_error`. On the web widget `read` means\nthe visitor opened the chat. Messages from the contact stay `sent`.\nTolerate unknown values.","enum":["sent","delivered","read","failed"],"type":"string"},"MethodPrice":{"description":"The price for one payment method.","properties":{"discount":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PricedDiscount","description":"The automatic discount this method gets, if any."}]},"installment_cents":{"description":"Each installment at `max_installments` after the first: the total\ndivided down to the cent (the first installment takes the\nremainder), or, when the store rounds prices, in whole reais rounded\nup (`installments::split`).","format":"int64","type":"integer"},"max_installments":{"description":"Interest-free installments allowed (1 for PIX and boleto). With\ninterest, more may be offered: `installments::plan` lists them.","format":"int32","type":"integer"},"method":{"description":"`pix`, `card` or `boleto`.","type":"string"},"total_cents":{"description":"What is charged with this method.","format":"int64","type":"integer"}},"required":["method","total_cents","max_installments","installment_cents"],"type":"object"},"MyBooking":{"allOf":[{"$ref":"#/components/schemas/PublicBooking"},{"properties":{"id":{"format":"uuid","type":"string"}},"required":["id"],"type":"object"}],"description":"One of a signed-in customer's bookings: the same view as the private link\nshows, with the id to act on it."},"OptionFacet":{"description":"An option across the listed products (Cor, Tamanho...).","properties":{"is_color":{"description":"A colour option: show `color_hex` swatches.","type":"boolean"},"key":{"description":"The option's key: its name folded to `a-z0-9_` (`tamanho_do_colchao`).","type":"string"},"name":{"description":"The option's name.","type":"string"},"values":{"items":{"$ref":"#/components/schemas/FacetValue"},"type":"array"}},"required":["key","name","is_color","values"],"type":"object"},"OrderDigitalItem":{"description":"A digital item of an order.","properties":{"instructions":{"type":["string","null"]},"product_title":{"description":"The product it came with.","type":"string"},"sent":{"description":"Whether it was e-mailed.","type":"boolean"},"title":{"type":"string"},"url":{"type":["string","null"]}},"required":["product_title","title","sent"],"type":"object"},"PackageBought":{"description":"A package bought: pay the Pix; the code is e-mailed once paid.","properties":{"payment":{"$ref":"#/components/schemas/PixToPay"}},"required":["payment"],"type":"object"},"PageBrand":{"description":"How the business looks on its booking pages, taken from the store's brand\nprofile. Absent when the store has no profile or nothing in it is usable.","properties":{"logo_url":{"description":"The logo, shown in place of the business's initials.","type":["string","null"]},"primary":{"description":"`#rrggbb`: buttons and highlights.","type":["string","null"]},"primary_text":{"description":"`#rrggbb`: text over `primary`. Always present with `primary`.","type":["string","null"]},"tagline":{"description":"One line under the business's name.","type":["string","null"]}},"type":"object"},"Page_Category":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Category"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Collection":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Collection"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_MyBooking":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/MyBooking"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_PortalReturn":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/PortalReturn"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_PortalSubscription":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/PortalSubscription"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_PrivacyRequest":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/PrivacyRequest"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Product":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Product"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_StorefrontCmsDocument":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StorefrontCmsDocument"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_StorefrontContentPage":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StorefrontContentPage"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_StorefrontCustomerOrder":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StorefrontCustomerOrder"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_StorefrontCustomerProduct":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StorefrontCustomerProduct"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_StorefrontCustomerSavedAddress":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StorefrontCustomerSavedAddress"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_StorefrontLocation":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StorefrontLocation"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_StorefrontMenu":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StorefrontMenu"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_StorefrontSavedCard":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StorefrontSavedCard"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"PaymentIntentStatus":{"description":"State of a payment attempt: `pending` (waiting for the customer),\n`processing` (the gateway is settling), `requires_action`, `approved`\n(paid), `failed`, `cancelled`, `expired` (e.g. an unpaid PIX code) or\n`refunded`.","enum":["pending","processing","requires_action","approved","failed","cancelled","expired","refunded"],"type":"string"},"PaymentMethod":{"description":"A payment method a gateway can offer at checkout.","enum":["pix","card","boleto"],"type":"string"},"PaymentNextAction":{"description":"What the shopper must do next, told by `type`. Built by the gateway\nadapters and answered as `next_action`.","oneOf":[{"description":"A PIX charge to pay: show `qr_code_base64` as an image (a PNG, base64)\nand offer `copy_paste`, the PIX \"copia e cola\" code. `expires_at` is\nwhen the code stops working.","properties":{"copy_paste":{"type":["string","null"]},"expires_at":{"type":["string","null"]},"qr_code":{"type":["string","null"]},"qr_code_base64":{"type":["string","null"]},"type":{"enum":["pix_qr"],"type":"string"}},"required":["type"],"type":"object"},{"description":"A card paid on the gateway's own page (Asaas): send the shopper to\n`url`; they come back to the order page.","properties":{"type":{"enum":["redirect"],"type":"string"},"url":{"type":"string"}},"required":["url","type"],"type":"object"},{"description":"A card charged on the spot (Mercado Pago): `approved` says it went\nthrough; `requires_action` that the issuer asks for more (3-D Secure).","properties":{"approved":{"type":"boolean"},"requires_action":{"type":"boolean"},"type":{"enum":["card_result"],"type":"string"}},"required":["approved","requires_action","type"],"type":"object"},{"description":"A boleto to pay by `due_date` (`YYYY-MM-DD`): `url` opens it to print\nor save, `digitable_line` is the linha digitável to type or paste in\na bank app (offer a copy button), `barcode` its 44 digits, and\n`pix_code` with `pix_qr_code_base64` a Pix that pays the same boleto,\nwhen the gateway issues one. A boleto is confirmed one to three\nbusiness days after it is paid; the order waits until `expires_at`.","properties":{"barcode":{"type":["string","null"]},"digitable_line":{"type":["string","null"]},"due_date":{"type":["string","null"]},"expires_at":{"type":["string","null"]},"pix_code":{"type":["string","null"]},"pix_qr_code_base64":{"type":["string","null"]},"type":{"enum":["boleto"],"type":"string"},"url":{"type":["string","null"]}},"required":["type"],"type":"object"}]},"PixToPay":{"description":"A Pix to pay.","properties":{"amount_cents":{"format":"int64","type":"integer"},"expires_at":{"format":"date-time","type":["string","null"]},"order_id":{"format":"uuid","type":"string"},"qr_code":{"description":"The copy-and-paste code.","type":["string","null"]},"qr_code_base64":{"description":"The QR code image, PNG in base64.","type":["string","null"]}},"required":["order_id","amount_cents"],"type":"object"},"PortalCashbackEntry":{"description":"One line of the customer's cashback while it waits.","properties":{"amount_cents":{"format":"int64","type":"integer"},"available_at":{"description":"From when it counts.","format":"date-time","type":"string"},"created_at":{"format":"date-time","type":"string"},"kind":{"description":"`earn`, `reverse`, `release` (it reached the wallet) or `clawback`.\nThe set may grow: treat other values as unknown entries.","type":"string"},"order_number":{"type":["string","null"]}},"required":["kind","amount_cents","available_at","created_at"],"type":"object"},"PortalCredit":{"description":"The signed-in customer's store credit.","properties":{"balance_cents":{"description":"What can be spent now.","format":"int64","type":"integer"},"currency":{"type":"string"},"entries":{"items":{"$ref":"#/components/schemas/PortalCreditEntry"},"type":"array"}},"required":["balance_cents","currency","entries"],"type":"object"},"PortalCreditEntry":{"description":"One line of the customer's credit history.","properties":{"amount_cents":{"description":"Signed: negative when credit was spent.","format":"int64","type":"integer"},"created_at":{"format":"date-time","type":"string"},"kind":{"description":"`issue`, `adjust`, `redeem`, `release`, `restore` or `expire`. The set\nmay grow: treat other values as unknown entries.","type":"string"},"order_number":{"type":["string","null"]}},"required":["kind","amount_cents","created_at"],"type":"object"},"PortalExchangeItem":{"description":"What the customer gets in an exchange.","properties":{"quantity":{"format":"int32","type":"integer"},"sku":{"type":["string","null"]},"title":{"type":"string"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","title","quantity"],"type":"object"},"PortalExchangeItemInput":{"description":"A variant the customer wants instead.","properties":{"quantity":{"format":"int32","type":"integer"},"variant_id":{"description":"A `variant_id` from `exchange_options`.","format":"uuid","type":"string"}},"required":["variant_id","quantity"],"type":"object"},"PortalField":{"description":"A customer field as their account page shows and edits it: the\ndefinition plus the current value (`null` when empty).","properties":{"help":{"type":["string","null"]},"key":{"type":"string"},"kind":{"description":"See [`Kind`].","type":"string"},"label":{"type":"string"},"label_translations":{"type":"object"},"max":{"format":"double","type":["number","null"]},"min":{"format":"double","type":["number","null"]},"options":{"description":"The choices of a `select` or `multiselect`.","items":{"type":"string"},"type":"array"},"unit":{"type":["string","null"]},"value":{"type":"object"}},"required":["key","label","label_translations","kind","options","value"],"type":"object"},"PortalLoyalty":{"description":"The signed-in customer's points and referral code.","properties":{"cashback":{"$ref":"#/components/schemas/CashbackBalance","description":"Their cashback that waits for its orders to stand, and what reached the wallet."},"cashback_entries":{"description":"The 50 most recent cashback entries, newest first.","items":{"$ref":"#/components/schemas/PortalCashbackEntry"},"type":"array"},"credit_balance_cents":{"description":"Their store credit balance (what redeemed points became, among others).","format":"int64","type":"integer"},"entries":{"description":"The 50 most recent entries, newest first.","items":{"$ref":"#/components/schemas/PortalLoyaltyEntry"},"type":"array"},"points_available":{"description":"Points they can turn into credit now.","format":"int64","type":"integer"},"points_expire_at":{"description":"When the points expire if they earn nothing more.","format":"date-time","type":["string","null"]},"points_pending":{"description":"Points waiting for their orders to stand.","format":"int64","type":"integer"},"program":{"$ref":"#/components/schemas/PortalLoyaltyProgram"},"rates":{"$ref":"#/components/schemas/EarnRates","description":"What a purchase earns them now, at their tier."},"redeemable_cents":{"description":"The credit `points_available` buys now, in whole blocks.","format":"int64","type":"integer"},"referral":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PortalReferral","description":"Empty while the store has referrals off."}]},"tier":{"$ref":"#/components/schemas/TierStanding","description":"Where they stand among the store's tiers (nothing current when it has none)."},"tier_changes":{"description":"Their tier changes and birthday bonuses, newest first.","items":{"$ref":"#/components/schemas/PortalTierChange"},"type":"array"},"wallet_entries":{"description":"The 50 most recent wallet entries, newest first.","items":{"$ref":"#/components/schemas/PortalWalletEntry"},"type":"array"},"wallet_expiring":{"description":"Wallet credit that expires, soonest first, with what is left of each.","items":{"$ref":"#/components/schemas/ExpiringCredit"},"type":"array"}},"required":["program","points_available","points_pending","redeemable_cents","credit_balance_cents","entries","tier","rates","cashback","cashback_entries","wallet_entries","wallet_expiring","tier_changes"],"type":"object"},"PortalLoyaltyEntry":{"description":"One line of the customer's points history.","properties":{"available_at":{"description":"From when the points count.","format":"date-time","type":"string"},"created_at":{"format":"date-time","type":"string"},"credit_cents":{"description":"A `redeem`: the credit it became, in cents.","format":"int64","type":["integer","null"]},"kind":{"description":"`earn`, `reverse`, `redeem`, `adjust` or `expire`. The set may grow:\ntreat other values as unknown entries.","type":"string"},"order_number":{"type":["string","null"]},"points":{"description":"Signed: negative when points left the balance.","format":"int32","type":"integer"}},"required":["kind","points","available_at","created_at"],"type":"object"},"PortalLoyaltyProgram":{"description":"The store's program as a shopper sees it.","properties":{"cashback_bps":{"description":"The program's cashback percent, in basis points (500 is 5%); a tier\ncan give more (`tiers`).","format":"int32","type":"integer"},"cashback_enabled":{"description":"Customers earn cashback: store credit on what they pay for goods.","type":"boolean"},"cashback_expire_months":{"description":"Months cashback stays in the wallet before it expires; empty: never.","format":"int32","type":["integer","null"]},"expire_after_months":{"description":"Points expire after this many months without earning; empty: never.","format":"int32","type":["integer","null"]},"pending_days":{"description":"Days after payment before an order's points count.","format":"int32","type":"integer"},"points_enabled":{"type":"boolean"},"points_per_currency_unit":{"description":"Points per R$ 1,00 paid (freight and store credit do not count).","format":"int32","type":"integer"},"redeem_step_cents":{"description":"...each worth this much credit, in cents.","format":"int64","type":"integer"},"redeem_step_points":{"description":"Points turn into credit in blocks of this many...","format":"int32","type":"integer"},"referee_reward_cents":{"description":"Credit for the friend after their first order, in cents.","format":"int64","type":"integer"},"referral_min_order_cents":{"description":"The friend's first order must reach this, before freight.","format":"int64","type":"integer"},"referrals_enabled":{"type":"boolean"},"referrer_reward_cents":{"description":"Credit for the customer who refers, in cents.","format":"int64","type":"integer"},"tier_window_months":{"description":"Tiers count what was paid for goods over this many months.","format":"int32","type":"integer"},"tiers":{"description":"The store's tiers, lowest first.","items":{"$ref":"#/components/schemas/LoyaltyTier"},"type":"array"}},"required":["points_enabled","points_per_currency_unit","redeem_step_points","redeem_step_cents","pending_days","referrals_enabled","referrer_reward_cents","referee_reward_cents","referral_min_order_cents","cashback_enabled","cashback_bps","tier_window_months","tiers"],"type":"object"},"PortalReferral":{"description":"The customer's referral code and how it went.","properties":{"code":{"description":"Share it as `{store}/?ref={code}` (`share_path`), or for the friend to\ntype at checkout.","type":"string"},"earned_cents":{"description":"Credit referrals earned them so far, in cents.","format":"int64","type":"integer"},"pending":{"description":"Friends whose first order is still waiting to stand.","format":"int64","type":"integer"},"rewarded":{"format":"int64","type":"integer"},"share_path":{"description":"`/?ref={code}`, on the store's own address.","type":"string"}},"required":["code","share_path","pending","rewarded","earned_cents"],"type":"object"},"PortalReturn":{"description":"A return, as the customer sees it.","properties":{"approved_at":{"format":"date-time","type":["string","null"]},"code":{"description":"\"D-0007\".","type":"string"},"discount_share_cents":{"description":"The part of the order's discount on these items.","format":"int64","type":"integer"},"exchange_items":{"description":"For an exchange: what the customer gets instead.","items":{"$ref":"#/components/schemas/PortalExchangeItem"},"type":"array"},"exchange_order_number":{"description":"The order of the exchange, once made.","type":["string","null"]},"exchanged_at":{"format":"date-time","type":["string","null"]},"items":{"items":{"$ref":"#/components/schemas/PortalReturnItem"},"type":"array"},"note":{"type":["string","null"]},"number":{"description":"1, 2, 3... per store.","format":"int32","type":"integer"},"order_number":{"type":["string","null"]},"reason":{"description":"`defective`, `wrong_item`, `not_as_described`, `damaged_in_transit`, `changed_mind` or `other`.","type":"string"},"received_at":{"format":"date-time","type":["string","null"]},"refund_cents":{"description":"What the items are worth (what they cost less their share of the\norder's discount): what the store will usually refund, or credit for\nan exchange.","format":"int64","type":"integer"},"refunded_at":{"format":"date-time","type":["string","null"]},"refunded_cents":{"format":"int64","type":"integer"},"rejection_reason":{"description":"Why the store said no, when `status` is `rejected`.","type":["string","null"]},"requested_at":{"format":"date-time","type":"string"},"resolution":{"description":"`refund` or `exchange`.","type":"string"},"shipping":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PortalReturnShipping","description":"How to send the goods back; null until the store approves."}]},"status":{"description":"`requested`, `approved`, `received`, `refunded`, `exchanged`, `rejected` or `cancelled`.","type":"string"}},"required":["number","code","status","reason","resolution","refund_cents","discount_share_cents","refunded_cents","requested_at","items","exchange_items"],"type":"object"},"PortalReturnItem":{"description":"One item of a return, as the customer sees it.","properties":{"quantity":{"format":"int32","type":"integer"},"sku":{"type":["string","null"]},"title":{"type":"string"},"unit_price_cents":{"format":"int64","type":"integer"}},"required":["title","quantity","unit_price_cents"],"type":"object"},"PortalReturnItemInput":{"description":"How many units of one order line to return.","properties":{"order_item_id":{"description":"The `order_item_id` from `GET .../returnable`.","format":"uuid","type":"string"},"quantity":{"format":"int32","type":"integer"}},"required":["order_item_id","quantity"],"type":"object"},"PortalReturnRequestBody":{"description":"A return request from the customer.","properties":{"exchange_items":{"description":"With `exchange`: other variants of the returned products (from\n`exchange_options`), no more units than are returned.","items":{"$ref":"#/components/schemas/PortalExchangeItemInput"},"type":"array"},"items":{"description":"The lines to send back; each order line at most once.","items":{"$ref":"#/components/schemas/PortalReturnItemInput"},"type":"array"},"note":{"description":"What happened, in the customer's words.","type":["string","null"]},"reason":{"description":"`defective`, `wrong_item`, `not_as_described`, `damaged_in_transit`, `changed_mind` or `other`.","type":"string"},"resolution":{"description":"`refund` (default) or `exchange`.","type":["string","null"]}},"required":["items","reason"],"type":"object"},"PortalReturnShipping":{"description":"How to send the goods back, once the store approved.","properties":{"carrier":{"type":["string","null"]},"code":{"description":"The carrier's authorization or postage code.","type":["string","null"]},"deadline":{"description":"The last day to post it, when the carrier set one (a Correios\nreverse authorization, already paid by the store).","format":"date","type":["string","null"]},"instructions":{"type":["string","null"]},"label_url":{"description":"A link to the prepaid label.","type":["string","null"]}},"type":"object"},"PortalReturnable":{"description":"What a customer can return from an order, and until when.","properties":{"closed_reason":{"description":"Why not: `disabled`, `not_paid`, `not_delivered`, `window_closed` or `nothing_left`.","type":["string","null"]},"exchanges_enabled":{"description":"Whether the customer can ask for an exchange instead of a refund.","type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/PortalReturnableItem"},"type":"array"},"open":{"description":"Whether the customer can ask now.","type":"boolean"},"window_ends_on":{"description":"The last day to ask, when the order was delivered.","format":"date","type":["string","null"]}},"required":["items","open","exchanges_enabled"],"type":"object"},"PortalReturnableItem":{"description":"One order line and how many can still be returned.","properties":{"exchange_options":{"description":"The product's variants the customer can ask for instead (another size\nor color); `available` says whether there is stock.","items":{"$ref":"#/components/schemas/ExchangeOption"},"type":"array"},"order_item_id":{"format":"uuid","type":"string"},"quantity":{"format":"int32","type":"integer"},"returnable":{"format":"int32","type":"integer"},"sku":{"type":["string","null"]},"title":{"type":"string"},"unit_price_cents":{"format":"int64","type":"integer"}},"required":["order_item_id","title","quantity","unit_price_cents","returnable","exchange_options"],"type":"object"},"PortalSubscription":{"description":"A subscription, as the customer sees it.","properties":{"can_resume":{"description":"Whether the customer can resume it themselves (false when the store paused it).","type":"boolean"},"id":{"format":"uuid","type":"string"},"interval_count":{"format":"int32","type":"integer"},"interval_unit":{"description":"`week` or `month`.","type":"string"},"items":{"items":{"$ref":"#/components/schemas/PortalSubscriptionItem"},"type":"array"},"next_order_at":{"description":"When the next order is placed; only for an active subscription.","format":"date-time","type":["string","null"]},"status":{"description":"`active`, `paused` or `cancelled`.","type":"string"}},"required":["id","status","interval_unit","interval_count","can_resume","items"],"type":"object"},"PortalSubscriptionItem":{"description":"One line of a subscription.","properties":{"quantity":{"format":"int32","type":"integer"},"title":{"type":"string"},"unit_price_cents":{"description":"What one unit costs today.","format":"int64","type":["integer","null"]}},"required":["title","quantity"],"type":"object"},"PortalTierChange":{"description":"One change of the customer's tier.","properties":{"created_at":{"format":"date-time","type":"string"},"from_tier":{"type":["string","null"]},"reason":{"description":"`payment`, `refund`, `nightly` (the window moved on), `tiers_changed`\nor `birthday` (a birthday bonus).","type":"string"},"to_tier":{"type":["string","null"]}},"required":["reason","created_at"],"type":"object"},"PortalWalletEntry":{"description":"One line of the customer's wallet (store credit) history.","properties":{"amount_cents":{"description":"Signed: negative when credit left the wallet.","format":"int64","type":"integer"},"created_at":{"format":"date-time","type":"string"},"expires_at":{"description":"Credit this entry brought expires on this day.","format":"date-time","type":["string","null"]},"kind":{"description":"`issue`, `adjust`, `redeem`, `release`, `restore`, `expire` or\n`cashback`. The set may grow: treat other values as unknown entries.","type":"string"},"note":{"description":"What it was, as the store wrote it (\"Cashback (pedido 1042)\").","type":["string","null"]},"order_number":{"type":["string","null"]}},"required":["kind","amount_cents","created_at"],"type":"object"},"PriceRange":{"description":"The lowest and highest price among a product's variants.","properties":{"max_cents":{"format":"int64","type":"integer"},"min_cents":{"format":"int64","type":"integer"}},"required":["min_cents","max_cents"],"type":"object"},"PriceTier":{"description":"A variant's own price in a list from `min_quantity` units of its product up.","properties":{"min_quantity":{"format":"int32","type":"integer"},"price_cents":{"format":"int64","type":"integer"}},"required":["min_quantity","price_cents"],"type":"object"},"PricedCart":{"description":"A priced cart: totals before the payment method is chosen, then the\ntotal for each method.","properties":{"currency":{"type":"string"},"discounts":{"description":"Discounts that apply whatever the payment method.","items":{"$ref":"#/components/schemas/PricedDiscount"},"type":"array"},"methods":{"items":{"$ref":"#/components/schemas/MethodPrice"},"type":"array"},"shipping_cents":{"format":"int64","type":"integer"},"subtotal_cents":{"format":"int64","type":"integer"},"tax_cents":{"format":"int64","type":"integer"},"total_cents":{"description":"Before any payment-method discount.","format":"int64","type":"integer"}},"required":["currency","subtotal_cents","discounts","shipping_cents","tax_cents","total_cents","methods"],"type":"object"},"PricedDiscount":{"description":"A discount applied to the cart, with where it came from.","properties":{"amount_cents":{"format":"int64","type":"integer"},"id":{"description":"The automatic discount or the code it came from; null for a\nnegotiated discount.","format":"uuid","type":["string","null"]},"kind":{"description":"An automatic discount's kind: `percent_off`, `fixed_off`,\n`buy_x_get_y` or `tiered`.","type":["string","null"]},"name":{"type":"string"},"source":{"description":"`promotion` (an automatic promotion: buy X get Y, a tier), `code` (a\ndiscount code the shopper typed), `quote` (negotiated) or `automatic`\n(a payment-method rule, e.g. PIX).","type":"string"}},"required":["source","name","amount_cents"],"type":"object"},"PrivacyRequest":{"description":"One request.","properties":{"contact_email":{"description":"The customer's e-mail when they asked (kept after an erasure, to answer them).","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","type":["string","null"]},"customer_name":{"type":["string","null"]},"details":{"type":["string","null"]},"due_at":{"description":"When the answer is due (15 days after the request).","format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"description":"`access`, `deletion`, `correction` or `other`.","type":"string"},"resolution":{"description":"What the store did, or why it refused.","type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"status":{"description":"`open`, `done` or `rejected`.","type":"string"}},"required":["id","kind","status","due_at","created_at"],"type":"object"},"Product":{"description":"A product. The list and the detail have the same shape; the list leaves\n`description` and `rich_text_description` null to stay light.","properties":{"available":{"description":"Some variant can be bought now (in stock or on demand).","type":"boolean"},"categories":{"items":{"$ref":"#/components/schemas/ProductCategory"},"type":"array"},"compare_at_cents":{"description":"The cheapest variant's regular price in cents while it is on\npromotion; null otherwise.","format":"int64","type":["integer","null"]},"description":{"description":"Plain text. Only on the detail.","type":["string","null"]},"fields":{"description":"Specifications the store shows for this product (material, warranty,\ndimensions), in display order; only fields with a value. Each field\ncarries its own label, kind and unit, so they can be rendered without\nfurther lookups.","items":{"$ref":"#/components/schemas/PublicField"},"type":"array"},"gift_card":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PublicGiftCard","description":"Present on a gift card product: its terms. Its variants are the values\non offer; with `custom_amount` the buyer may type another within the limits."}]},"highlights":{"description":"Selling points, one line each.","items":{"type":"string"},"type":"array"},"id":{"format":"uuid","type":"string"},"images":{"description":"Product-level images (variant images are under each variant), photos\nfirst, then dimension drawings.","items":{"$ref":"#/components/schemas/ProductImage"},"type":"array"},"model_placement":{"description":"How the model is placed (for example `floor` or `wall`) when the\nviewer supports augmented reality.","type":["string","null"]},"model_url":{"description":"3D model (glTF/GLB) for a product viewer.","type":["string","null"]},"price_cents":{"description":"What the shopper pays for the cheapest variant, in cents. Null when no\nvariant has a price.","format":"int64","type":["integer","null"]},"price_range":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PriceRange","description":"Lowest and highest price across variants; null when none has a price."}]},"prices_hidden":{"description":"The store shows prices to signed-in customers only and the request has\nnone: every price is null. Ask the shopper to sign in.","type":"boolean"},"reference_tables":{"description":"The store's reference tables this product shows, in order: fabric\npalettes, size charts and dimension tables, its own first, then those\nof its categories and collections. Only on the detail; empty in the list.","items":{"$ref":"#/components/schemas/StorefrontReferenceTable"},"type":"array"},"rich_text_description":{"description":"HTML. Only on the detail.","type":["string","null"]},"short_description":{"type":["string","null"]},"slug":{"type":"string"},"title":{"type":"string"},"variants":{"items":{"$ref":"#/components/schemas/ProductVariant"},"type":"array"}},"required":["id","slug","title","highlights","available","images","variants","categories","fields","reference_tables","prices_hidden"],"type":"object"},"ProductCategory":{"description":"A category as embedded in a product.","properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","slug","name"],"type":"object"},"ProductFacets":{"description":"The counts behind each filter of a product list.","properties":{"brands":{"description":"The brands of the listed products.","items":{"$ref":"#/components/schemas/FacetValue"},"type":"array"},"in_stock_count":{"description":"Products that would match with `in_stock=true`.","format":"int64","type":"integer"},"options":{"description":"The options of the listed products' variants, each with its values.","items":{"$ref":"#/components/schemas/OptionFacet"},"type":"array"},"price":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FacetPriceRange","description":"The lowest and highest product price with every filter but the price;\nnull when no product has a price, and for a visitor where the store\nshows prices to signed-in customers only (price bounds are then ignored)."}]},"scope_total":{"description":"Products of the list's scope (`search`, `category`, `collection`) with\nan active variant, before the other filters.","format":"int64","type":"integer"},"total":{"description":"Products that match every filter.","format":"int64","type":"integer"}},"required":["total","scope_total","in_stock_count","brands","options"],"type":"object"},"ProductImage":{"description":"A product or variant image.","properties":{"alt":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"kind":{"$ref":"#/components/schemas/ImageKind"},"position":{"description":"Position in the gallery, starting at 0.","format":"int32","type":"integer"},"sizes":{"description":"`url` first, followed by its resized renditions (small, medium, large,\nthumbnail) when the image is served by the API.","items":{"type":"string"},"type":"array"},"url":{"description":"The original image. Relative to the API host when it is served by the\nAPI, absolute when it lives on a CDN.","type":"string"}},"required":["id","url","sizes","position","kind"],"type":"object"},"ProductRatingSummary":{"description":"Approved reviews of a product, by rating.","properties":{"average":{"description":"Mean rating, 0 when there are none.","format":"double","type":"number"},"count_1":{"format":"int64","type":"integer"},"count_2":{"format":"int64","type":"integer"},"count_3":{"format":"int64","type":"integer"},"count_4":{"format":"int64","type":"integer"},"count_5":{"format":"int64","type":"integer"},"total":{"format":"int64","type":"integer"}},"required":["total","average","count_5","count_4","count_3","count_2","count_1"],"type":"object"},"ProductReview":{"description":"An approved review as shoppers see it.","properties":{"author_name":{"type":"string"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"is_verified_purchase":{"description":"The author's e-mail bought the product in this store.","type":"boolean"},"rating":{"description":"1 to 5.","format":"int32","type":"integer"},"title":{"type":["string","null"]}},"required":["id","author_name","rating","body","is_verified_purchase","created_at"],"type":"object"},"ProductReviewList":{"description":"A page of a product's approved reviews with the rating summary. Paged\nlike every list (`limit`, `cursor`, `offset`).","properties":{"data":{"description":"Reviews, newest first.","items":{"$ref":"#/components/schemas/ProductReview"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"summary":{"$ref":"#/components/schemas/ProductRatingSummary"},"total":{"description":"Approved reviews of the product (always present, unlike on other lists).","format":"int64","type":"integer"}},"required":["data","has_more","total","summary"],"type":"object"},"ProductSubscribeRequest":{"description":"\"Let me know\" sign-up.","properties":{"email":{"type":"string"},"first_name":{"type":["string","null"]},"kind":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProductSubscriptionKind","description":"What to be told about. Defaults to `back_in_stock`."}]},"marketing_opt_in":{"description":"The shopper ticked \"send me news\". Only used when the e-mail is new\nto the store.","type":["boolean","null"]},"variant_id":{"description":"Watch one variant only (back in stock).","format":"uuid","type":["string","null"]}},"required":["email"],"type":"object"},"ProductSubscriptionKind":{"description":"What a shopper wants to hear about.","enum":["back_in_stock","price_drop"],"type":"string"},"ProductVariant":{"description":"A purchasable variant of a product. `id` is what the cart takes.","properties":{"availability":{"$ref":"#/components/schemas/Availability"},"available_quantity":{"description":"Units that can be added to a cart now, capped at 99.","format":"int32","type":"integer"},"compare_at_cents":{"description":"The regular price in cents, to show struck through, while the variant\nis on promotion; null otherwise.","format":"int64","type":["integer","null"]},"expected_availability_at":{"description":"For `preorder`: when it is expected to be available.","format":"date-time","type":["string","null"]},"fields":{"description":"Details the store shows for this variant (a size, a finish), in display\norder; only fields with a value.","items":{"$ref":"#/components/schemas/PublicField"},"type":"array"},"id":{"format":"uuid","type":"string"},"image":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProductImage","description":"The variant's own main image, when it has one."}]},"in_stock":{"description":"There are units on hand to ship right away.","type":"boolean"},"options":{"description":"The options this variant is a combination of, in the product's option order.","items":{"$ref":"#/components/schemas/VariantOption"},"type":"array"},"price_cents":{"description":"What the shopper pays per unit, in cents. Null when the variant has no price yet.","format":"int64","type":["integer","null"]},"price_tiers":{"description":"A signed-in reseller's quantity prices: from `min_quantity` units of\nthe product (every size and colour together) each unit costs\n`price_cents`. Empty for everybody else.","items":{"$ref":"#/components/schemas/PriceTier"},"type":"array"},"sku":{"type":"string"},"title":{"type":"string"}},"required":["id","sku","title","options","availability","in_stock","available_quantity","fields","price_tiers"],"type":"object"},"PromotionProgress":{"description":"What the cart still needs for a promotion's next step: \"faltam R$ 120\npara 10% off\", \"leve mais 1 e ganhe 1\".","properties":{"id":{"format":"uuid","type":"string"},"kind":{"description":"`buy_x_get_y`, `tiered` or `bundle`.","type":"string"},"name":{"type":"string"},"remaining_cents":{"description":"Cents of eligible products still missing (a subtotal tier).","format":"int64","type":["integer","null"]},"remaining_quantity":{"description":"Eligible units still missing (a quantity tier, buy X get Y), or the\nproducts of a compre junto set still missing (a bundle).","format":"int64","type":["integer","null"]},"reward_quantity":{"description":"Units given (buy X get Y); 0 for a tier.","format":"int32","type":"integer"},"reward_type":{"description":"What the next step gives: `percent` (a whole percent), `fixed`\n(cents off) or, for buy X get Y, `percent` off `reward_quantity` units.","type":"string"},"reward_value":{"format":"int32","type":"integer"}},"required":["id","name","kind","reward_type","reward_value","reward_quantity"],"type":"object"},"PublicBooking":{"description":"A booking as its client sees it.","properties":{"brand":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PageBrand"}]},"can_change":{"description":"The client can still cancel or move it now.","type":"boolean"},"cancel_cutoff_hours":{"description":"How long before the start the client can still cancel or move it.","format":"int32","type":"integer"},"client_name":{"type":"string"},"code":{"description":"\"A-0007\".","type":"string"},"deposit_cents":{"description":"The deposit asked, and what was paid.","format":"int64","type":"integer"},"ends_at":{"format":"date-time","type":"string"},"max_advance_days":{"description":"How many days ahead the service can be booked (how far moving can reach).","format":"int32","type":"integer"},"paid_cents":{"format":"int64","type":"integer"},"payment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PixToPay","description":"While `pending_payment`: the Pix to pay."}]},"price_cents":{"format":"int64","type":"integer"},"provider_name":{"type":"string"},"service_name":{"type":"string"},"starts_at":{"format":"date-time","type":"string"},"status":{"description":"`pending_payment`, `confirmed`, `completed`, `no_show` or `cancelled`.","type":"string"},"store_name":{"type":"string"},"time_zone":{"description":"The provider's zone, for showing the time.","type":"string"},"video_url":{"description":"The video room of an online service, once confirmed.","type":["string","null"]}},"required":["code","store_name","service_name","provider_name","client_name","starts_at","ends_at","time_zone","status","price_cents","cancel_cutoff_hours","max_advance_days","can_change","deposit_cents","paid_cents"],"type":"object"},"PublicField":{"description":"A field value as the storefront shows it: self-describing, so a theme or\napp can render it without knowing the store's definitions.","properties":{"group":{"description":"The field's group (`Materiais`), for sectioned tables.","type":["string","null"]},"key":{"type":"string"},"kind":{"description":"See [`Kind`].","type":"string"},"label":{"type":"string"},"label_translations":{"description":"The label by language tag; `label` is the fallback.","type":"object"},"unit":{"description":"Shown after the value (`cm`).","type":["string","null"]},"value":{"description":"A string, number, boolean or (for `multiselect`) list of strings.","type":"object"}},"required":["key","label","label_translations","kind","value"],"type":"object"},"PublicGiftCard":{"description":"What a gift card product allows.","properties":{"custom_amount":{"description":"The buyer may type the amount (`amount_cents` on the gift card line)\ninstead of picking a variant.","type":"boolean"},"max_cents":{"format":"int64","type":"integer"},"min_cents":{"description":"Smallest and largest card, in cents.","format":"int64","type":"integer"}},"required":["custom_amount","min_cents","max_cents"],"type":"object"},"PublicPackage":{"description":"A package as its holder sees it, by its code.","properties":{"expires_at":{"format":"date-time","type":["string","null"]},"name":{"type":"string"},"service_id":{"format":"uuid","type":"string"},"service_name":{"type":"string"},"sessions":{"format":"int32","type":"integer"},"sessions_left":{"format":"int32","type":"integer"},"usable":{"description":"It can be booked with now.","type":"boolean"}},"required":["name","service_id","service_name","sessions","sessions_left","usable"],"type":"object"},"PublicPackagePlan":{"description":"A package of sessions for sale.","properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"price_cents":{"format":"int64","type":"integer"},"service_id":{"format":"uuid","type":"string"},"sessions":{"format":"int32","type":"integer"},"valid_days":{"description":"Days it is valid after purchase; empty never expires.","format":"int32","type":["integer","null"]}},"required":["id","service_id","name","sessions","price_cents"],"type":"object"},"PublicProvider":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"time_zone":{"description":"IANA zone the provider's times are read in.","type":"string"}},"required":["id","name","time_zone"],"type":"object"},"PublicService":{"description":"A service a client can book.","properties":{"capacity":{"description":"Seats per start: more than 1 is a class.","format":"int32","type":"integer"},"deposit_cents":{"description":"Charged by Pix when booking (0: nothing); a package code skips it.","format":"int64","type":"integer"},"description":{"type":["string","null"]},"duration_min":{"format":"int32","type":"integer"},"id":{"format":"uuid","type":"string"},"intake_questions":{"description":"Questions to answer when booking.","items":{"$ref":"#/components/schemas/IntakeQuestion"},"type":"array"},"max_advance_days":{"description":"How many days ahead a client can book it.","format":"int32","type":"integer"},"name":{"type":"string"},"online":{"description":"Delivered by video.","type":"boolean"},"price_cents":{"format":"int64","type":"integer"},"providers":{"description":"The providers who deliver it; pass one as `provider_id` to choose, or\nnone to take whoever is free.","items":{"$ref":"#/components/schemas/PublicProvider"},"type":"array"},"sensitive":{"description":"Answering needs the client's consent (`consent: true`), shown as\n`consent_text`.","type":"boolean"}},"required":["id","name","duration_min","price_cents","deposit_cents","capacity","online","intake_questions","sensitive","max_advance_days","providers"],"type":"object"},"QuotedBoxes":{"description":"The boxes a quote was made with.","properties":{"count":{"format":"int32","type":"integer"},"gross_weight_g":{"format":"int64","type":"integer"},"volume_mm3":{"description":"Sum of the boxes' outer volumes, in cubic millimetres.","format":"int64","type":"integer"}},"required":["count","gross_weight_g","volume_mm3"],"type":"object"},"RedeemMyPoints":{"description":"Points to turn into credit.","properties":{"points":{"description":"A multiple of the program's `redeem_step_points`.","format":"int64","type":"integer"}},"required":["points"],"type":"object"},"ReferenceTableKind":{"description":"What a table holds and how the storefront shows it.","enum":["swatches","measurements","dimensions"],"type":"string"},"ReferenceTableSource":{"description":"Where a table on a product comes from.","enum":["product","category","collection"],"type":"string"},"ReviewStatus":{"description":"`pending` (waiting for moderation), `approved` (shown on the storefront)\nor `rejected`.","enum":["pending","approved","rejected"],"type":"string"},"ReviewSubmitRequest":{"description":"A shopper's review.","properties":{"author_email":{"type":"string"},"author_name":{"description":"1 to 200 characters.","type":"string"},"body":{"description":"1 to 5000 characters.","type":"string"},"rating":{"description":"1 to 5.","format":"int32","type":"integer"},"title":{"type":["string","null"]}},"required":["author_name","author_email","rating","body"],"type":"object"},"SalesChannel":{"description":"How a business sells.","enum":["store","online","catalog"],"type":"string"},"SaveProduct":{"description":"What to remember about the saved product.","properties":{"variant_id":{"description":"The variant the shopper had chosen.","format":"uuid","type":["string","null"]}},"type":"object"},"SchedulingWindow":{"description":"The days a scheduled order may be asked for, both ends included.","properties":{"earliest_on":{"description":"The first day that may be picked: today plus the store's lead time.","format":"date","type":"string"},"latest_on":{"description":"The last day that may be picked: a year from today.","format":"date","type":"string"}},"required":["earliest_on","latest_on"],"type":"object"},"SetCartReferral":{"description":"A friend's referral code.","properties":{"code":{"description":"As shared, in any case, with or without spaces and dashes.","type":"string"}},"required":["code"],"type":"object"},"SharedWishlist":{"description":"A list somebody shared.","properties":{"items":{"description":"Newest first, at most 200.","items":{"$ref":"#/components/schemas/SharedWishlistItem"},"type":"array"},"owner_name":{"description":"The owner's first name, when the customer has one.","type":["string","null"]}},"required":["items"],"type":"object"},"SharedWishlistItem":{"description":"One product of a shared list: what anyone with the link may see.","properties":{"handle":{"description":"The product's slug.","type":"string"},"in_stock":{"type":"boolean"},"price_cents":{"description":"The lowest price a shopper pays now, in cents.","format":"int64","type":["integer","null"]},"product_id":{"format":"uuid","type":"string"},"title":{"type":"string"}},"required":["product_id","title","handle","in_stock"],"type":"object"},"ShippingRuleChannel":{"description":"Where a sale is made, for rules limited to some of them.","enum":["storefront","pos","quotes","conversations"],"type":"string"},"StartMySubscription":{"description":"A subscription to start.","properties":{"interval_count":{"format":"int32","type":"integer"},"interval_unit":{"description":"`week` or `month`: one of the product's `subscription_options`.","type":"string"},"quantity":{"description":"How many of it each time; 1 when omitted.","format":"int32","type":["integer","null"]},"variant_id":{"description":"The variant to receive (a product that offers subscriptions).","format":"uuid","type":"string"}},"required":["variant_id","interval_unit","interval_count"],"type":"object"},"StoreContact":{"description":"How a storefront reaches the store's customers.","properties":{"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"type":"object"},"StoreFormConsentChannel":{"enum":["email","whatsapp"],"type":"string"},"StoreFormField":{"properties":{"consent_channel":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StoreFormConsentChannel","description":"For `consent`: ticked, it is an opt-in to offers on this channel\n(`email` or `whatsapp`), recorded on the customer with the label as\nthe words agreed to. Without it the box is an acceptance only (terms,\nprivacy policy) and records no marketing consent."}]},"key":{"description":"`a-z`, `0-9`, `_`; the submission's key.","type":"string"},"label":{"type":"string"},"max_length":{"description":"For text fields; defaults to 500 (`textarea`: 5000).","format":"int32","minimum":0,"type":["integer","null"]},"options":{"description":"For `select`, `radio`, `checkboxes`.","items":{"type":"string"},"type":"array"},"placeholder":{"type":["string","null"]},"required":{"type":"boolean"},"type":{"$ref":"#/components/schemas/StoreFormFieldType"}},"required":["key","label","type"],"type":"object"},"StoreFormFieldType":{"description":"What a field accepts. Brazilian types are validated and stored\ncanonical: `phone` as E.164, `cpf`/`cnpj`/`document`/`cep` as digits.","enum":["text","textarea","email","phone","cpf","cnpj","document","cep","number","date","select","radio","checkboxes","consent"],"type":"string"},"StoreInfo":{"description":"The store a publishable key belongs to.","properties":{"contact":{"$ref":"#/components/schemas/StoreContact","description":"Where customers can reach the store."},"country":{"description":"ISO 3166-1 alpha-2 code of the country the store sells from, when\nknown (from its company profile or its first location).","type":["string","null"]},"currency":{"description":"ISO 4217 code every amount in cents is in, e.g. `BRL`.","type":"string"},"locale":{"description":"Language tag of the store's content, e.g. `pt-BR`.","type":"string"},"logo_url":{"description":"The store's logo, when its brand has one.","type":["string","null"]},"name":{"type":"string"},"payment_providers":{"description":"Codes of the payment providers the store has switched on (for\nexample `mercado_pago`). `GET /storefront/payment-methods` has what a\ncheckout needs to charge.","items":{"type":"string"},"type":"array"},"pickup_enabled":{"description":"At least one active location offers pickup (`GET /storefront/locations?pickup=true`).","type":"boolean"},"reviews_enabled":{"description":"Shoppers can submit product reviews.","type":"boolean"},"slug":{"type":"string"},"timezone":{"description":"IANA time zone of the store, e.g. `America/Sao_Paulo`.","type":["string","null"]}},"required":["name","slug","currency","locale","contact","payment_providers","pickup_enabled","reviews_enabled"],"type":"object"},"StoreLocationPhoto":{"description":"A photo of a location.","properties":{"alt":{"type":["string","null"]},"url":{"type":"string"}},"required":["url"],"type":"object"},"StorefrontCart":{"description":"The shopper's open cart.","properties":{"contact_draft":{"$ref":"#/components/schemas/StorefrontCartContactDraft"},"currency":{"type":"string"},"destination_postal_code":{"description":"CEP of the last shipping quote.","type":["string","null"]},"discount_cents":{"format":"int64","type":"integer"},"discount_code":{"description":"The discount code the shopper applied (`PUT .../discount-code`),\nwhich `discount_cents` comes from; null when none.","type":["string","null"]},"discount_code_issue":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiscountCodeRejection","description":"Why `discount_code` gives nothing now (`already_used`,\n`first_purchase_only`, `not_eligible_customer`); null while it\napplies. Checkout refuses while it is set. Always sent (optional in\nthe schema for older clients)."}]},"free_shipping":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FreeShippingProgress","description":"The store's free shipping for this cart: the lowest subtotal (after\ndiscounts) at which a free-shipping rule applies at the cart's CEP (the\nlast quoted one, else the contact form's; before either, only rules for\nevery destination count), and what is left. Null when no rule can apply."}]},"fulfillment_method":{"description":"`shipping` or `pickup`.","type":"string"},"id":{"format":"uuid","type":"string"},"item_count":{"format":"int32","type":"integer"},"items":{"items":{"$ref":"#/components/schemas/StorefrontCartItem"},"type":"array"},"pickup_location_id":{"format":"uuid","type":["string","null"]},"price_list_name":{"description":"The price list the lines are priced at (the signed-in customer's group's); null at retail prices.","type":["string","null"]},"promotion_cents":{"description":"What the automatic promotions take off together (`promotions`),\nalready out of `total_cents`. Always sent (optional in the schema for\nolder clients).","format":"int64","type":"integer"},"promotion_progress":{"description":"What the cart still needs for a promotion's next step (\"R$ 120 more\nfor 10% off\", \"1 more and get 1 free\"). Always sent (optional in the\nschema for older clients).","items":{"$ref":"#/components/schemas/PromotionProgress"},"type":"array"},"promotions":{"description":"The automatic promotions the cart gets (buy X get Y, progressive\ntiers), each with its name and amount. Always sent (optional in the\nschema for older clients).","items":{"$ref":"#/components/schemas/AppliedPromotion"},"type":"array"},"requires_shipping":{"description":"Some line is a physical product.","type":"boolean"},"scheduled_on":{"description":"The day the shopper asked the order to be sent\n(`PUT .../scheduled-date`); null for as soon as possible. Always\nsent (optional in the schema for older clients).","format":"date","type":["string","null"]},"scheduling":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SchedulingWindow","description":"The days the store lets the shopper pick for a scheduled order; null\nwhen it does not take them. Always sent (optional in the schema for\nolder clients)."}]},"selected_shipping_option_id":{"description":"The chosen option's `option_id`; null until one is chosen.","type":["string","null"]},"shipping_cents":{"format":"int64","type":"integer"},"shipping_options":{"description":"Options of the last shipping quote (`POST .../shipping-quotes`).","items":{"$ref":"#/components/schemas/StorefrontShippingOption"},"type":"array"},"store_id":{"format":"uuid","type":"string"},"subtotal_cents":{"format":"int64","type":"integer"},"tax_cents":{"format":"int64","type":"integer"},"total_cents":{"format":"int64","type":"integer"},"wholesale_issues":{"description":"What keeps the cart from checking out under the customer's wholesale rules (a minimum order, a minimum\nquantity or pack of a product, a product their group does not buy), each with a message to show. Empty when\nnothing does; checkout answers `wholesale_rules_unmet` while it is not.","items":{"$ref":"#/components/schemas/WholesaleIssue"},"type":"array"}},"required":["id","store_id","item_count","subtotal_cents","tax_cents","shipping_cents","discount_cents","total_cents","currency","requires_shipping","shipping_options","items","fulfillment_method","wholesale_issues"],"type":"object"},"StorefrontCartContactDraft":{"description":"The contact details saved on the cart, for pre-filling checkout.","properties":{"additional_info":{"type":["string","null"]},"billing":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BillingAddress","description":"The billing address typed with the box unticked; null while billed at\nthe delivery address."}]},"billing_same_as_shipping":{"description":"The box \"use the same address for billing\". Always sent (optional in\nthe schema for older clients).","type":"boolean"},"city":{"type":["string","null"]},"email":{"type":["string","null"]},"invalid_fields":{"additionalProperties":{"$ref":"#/components/schemas/StorefrontInvalidField"},"description":"Fields that fail validation (CPF/CNPJ check digits, phone with a real\nDDD, e-mail, CEP, UF), by field name. The draft keeps what the\nshopper typed, so checkout can show these next to the inputs. The\nbilling address's are `billing_zip_code` and `billing_state`.","propertyNames":{"type":"string"},"type":"object"},"name":{"type":["string","null"]},"neighborhood":{"type":["string","null"]},"number":{"type":["string","null"]},"phone":{"type":["string","null"]},"state":{"type":["string","null"]},"street":{"type":["string","null"]},"zip_code":{"type":["string","null"]}},"required":["invalid_fields"],"type":"object"},"StorefrontCartContactUpsertRequest":{"description":"The shopper's contact and delivery details, saved as the cart's draft.\nEvery field replaces the stored one (send the whole form), except\n`document`, which a blank value does not erase.","properties":{"additional_info":{"type":["string","null"]},"billing":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BillingAddress","description":"Where the order is billed, when `billing_same_as_shipping` is false."}]},"billing_same_as_shipping":{"description":"The box \"use the same address for billing\", ticked unless the shopper\nunticked it. True (or left out) bills the order at the delivery address\nand forgets any `billing` saved before; false keeps `billing`. A pickup\nhas one address, the billing one: the box does not apply to it.","type":["boolean","null"]},"city":{"type":["string","null"]},"document":{"description":"CPF/CNPJ; stored as digits.","type":["string","null"]},"email":{"type":["string","null"]},"email_opt_in":{"description":"The shopper ticked \"receive offers by e-mail\". Recorded as consent\nwhen the order is placed (with the IP and browser of this request).","type":["boolean","null"]},"name":{"type":["string","null"]},"neighborhood":{"type":["string","null"]},"number":{"type":["string","null"]},"phone":{"type":["string","null"]},"state":{"type":["string","null"]},"street":{"type":["string","null"]},"whatsapp_opt_in":{"description":"The shopper ticked \"receive offers by WhatsApp\".","type":["boolean","null"]},"zip_code":{"type":["string","null"]}},"type":"object"},"StorefrontCartCreateRequest":{"description":"Open a cart.","properties":{"currency":{"description":"ISO 4217 code; defaults to the store's currency.","type":["string","null"]}},"type":"object"},"StorefrontCartDiscountCodeRequest":{"description":"A discount code the shopper typed in the cart.","properties":{"code":{"description":"The code as typed; case and surrounding spaces do not matter.","type":"string"}},"required":["code"],"type":"object"},"StorefrontCartFulfillmentRequest":{"description":"Switch the cart between pickup at a store location and shipping.","properties":{"method":{"$ref":"#/components/schemas/FulfillmentMethod"},"pickup_location_id":{"description":"The pickup location; required for `pickup`.","format":"uuid","type":["string","null"]}},"required":["method"],"type":"object"},"StorefrontCartGiftCardAdd":{"description":"A gift card for the cart.","properties":{"amount_cents":{"description":"For a product that lets the buyer type the amount: the amount, in\ncents (R$ 10,00 to R$ 50.000,00). 422 `custom_amount_not_allowed` for\na product that does not.","format":"int64","type":["integer","null"]},"deliver_on":{"format":"date","type":["string","null"]},"message":{"type":["string","null"]},"recipient_email":{"type":["string","null"]},"recipient_name":{"type":["string","null"]},"sender_name":{"type":["string","null"]},"variant_id":{"description":"The gift card product's variant: the face value.","format":"uuid","type":"string"}},"required":["variant_id"],"type":"object"},"StorefrontCartItem":{"description":"One line of the shopper's cart.","properties":{"gift_card":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/GiftCardDetails","description":"A gift card line: who it is for and when it is sent. Null for goods."}]},"id":{"format":"uuid","type":"string"},"product_id":{"format":"uuid","type":"string"},"quantity":{"format":"int32","type":"integer"},"sku":{"type":["string","null"]},"title":{"description":"Product title, with the variant title when it adds anything.","type":"string"},"total_cents":{"format":"int64","type":"integer"},"unit_price_cents":{"format":"int64","type":"integer"},"variant_id":{"format":"uuid","type":"string"}},"required":["id","product_id","variant_id","title","quantity","unit_price_cents","total_cents"],"type":"object"},"StorefrontCartItemAddRequest":{"description":"Add a variant to the cart.","properties":{"quantity":{"description":"How many to add. Defaults to 1.","format":"int32","minimum":1,"type":["integer","null"]},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id"],"type":"object"},"StorefrontCartItemSetRequest":{"description":"A cart line's new quantity.","properties":{"quantity":{"description":"`0` removes the line.","format":"int32","minimum":0,"type":"integer"}},"required":["quantity"],"type":"object"},"StorefrontCartScheduledDateRequest":{"description":"The day the shopper asks the order to be sent.","properties":{"scheduled_on":{"description":"A day (`YYYY-MM-DD`) inside the cart's `scheduling` window, or\n`null` to send the order as soon as possible.","format":"date","type":["string","null"]}},"type":"object"},"StorefrontCartShippingOptionRequest":{"description":"Which option of the cart's last shipping quote to apply.","properties":{"option_id":{"description":"`option_id` of one of the cart's `shipping_options`.","type":"string"}},"required":["option_id"],"type":"object"},"StorefrontCartShippingQuoteRequest":{"description":"Where to quote shipping to.","properties":{"destination_postal_code":{"description":"CEP, with or without the dash (8 digits).","type":"string"}},"required":["destination_postal_code"],"type":"object"},"StorefrontCartWhatsappRequest":{"description":"The cart drawer's WhatsApp step: a phone and whether reminders and offers\nmay go to it.","properties":{"phone":{"type":"string"},"whatsapp_opt_in":{"description":"Consent to this cart's reminders and the store's offers on WhatsApp\n(the drawer sends true when the shopper presses Continuar, under the\nwords it records); false saves the phone alone.","type":"boolean"}},"required":["phone"],"type":"object"},"StorefrontCheckoutResult":{"description":"The paid order the cart became.","properties":{"cart_id":{"format":"uuid","type":"string"},"currency":{"description":"ISO 4217 code.","type":["string","null"]},"order_id":{"format":"uuid","type":"string"},"order_number":{"description":"The number the shopper sees and `GET /storefront/customers/me/orders/{number}` takes.","type":["string","null"]},"total_cents":{"format":"int64","type":["integer","null"]}},"required":["order_id","cart_id"],"type":"object"},"StorefrontCmsDocument":{"additionalProperties":true,"description":"A CMS document (a blog post, a slide, a testimonial...), as a theme's `cms.<slug>` lists it: `id`, `slug` and `position`, and the collection's own fields by name, with image, video and file fields expanded to `{ id, url, original_url, poster, filename, original_name, mime_type, width, height, alt }`.","properties":{"id":{"format":"uuid","type":"string"},"position":{"description":"Its place in the collection's order.","format":"int64","type":"integer"},"slug":{"description":"The document's address segment: a blog post is at `/{page}/{slug}`.","type":["string","null"]}},"required":["id","slug","position"],"type":"object"},"StorefrontContentPage":{"description":"A content page (about, shipping policy...), as a theme's `page` object\nhas it.","properties":{"content":{"description":"The body as HTML, sanitized (no scripts or inline handlers).","type":"string"},"created_at":{"format":"date-time","type":["string","null"]},"handle":{"description":"The address segment: the page is at `/{handle}`.","type":"string"},"id":{"description":"Null for a policy page the platform writes from the store's company\ndetails (`source` `legal`).","format":"uuid","type":["string","null"]},"source":{"description":"`page`, written by the store in the admin; `theme`, a page file of the\nlive theme (`pages/{handle}.html`); or `legal`, a privacy, returns or\nterms page the platform writes from \"Dados da empresa\" until the store\nhas its own at that address.","type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":["string","null"]},"url":{"description":"Where the page is on the store's domain.","type":"string"}},"required":["handle","title","content","url","source"],"type":"object"},"StorefrontCreateIntentRequest":{"description":"Pay for the cart.","properties":{"card_token":{"description":"Mercado Pago card token from the card form; required for `card`,\nexcept when the store's card gateway is Asaas (the shopper types the\ncard on Asaas's page, see `next_action`).","type":["string","null"]},"installments":{"description":"For `card`: one of the counts `getStorefrontInstallments` lists for\nthe amount (the store's maximum, lowered by a quote's). Past the\nstore's interest-free installments, the charge includes the store's\ninterest, or the gateway adds its own.","format":"int32","type":["integer","null"]},"method":{"$ref":"#/components/schemas/PaymentMethod","description":"`pix`, `card` or `boleto` (`listStorefrontPaymentMethods` says which\nthe store takes). A boleto needs the payer's CPF/CNPJ and the cart's\nbilling address, and takes no installments."},"payer":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StorefrontPayer"}]},"save_card":{"description":"Keep this card for the signed-in customer's next purchases (stores\nthat offer saved cards, `listStorefrontPaymentMethods`).","type":"boolean"},"save_card_token":{"description":"Mercado Pago, with `save_card`: a second token of the same card (a\ntoken pays once), saved once the payment is approved.","type":["string","null"]},"saved_card_id":{"description":"Pay with this saved card of the signed-in customer\n(`listStorefrontSavedCards`). With Mercado Pago, `card_token` is\nstill required: made in the browser from the saved card's id and its\nCVV (`mp.createCardToken({ cardId, securityCode })`).","format":"uuid","type":["string","null"]}},"required":["method"],"type":"object"},"StorefrontCustomerAddress":{"description":"A Brazilian address, in its parts.","properties":{"city":{"type":["string","null"]},"complement":{"type":["string","null"]},"neighborhood":{"type":["string","null"]},"number":{"type":["string","null"]},"postal_code":{"description":"CEP, 8 digits.","type":["string","null"]},"state":{"description":"UF, two letters.","type":["string","null"]},"street":{"type":["string","null"]}},"type":"object"},"StorefrontCustomerAddressInput":{"allOf":[{"$ref":"#/components/schemas/StorefrontCustomerAddress"},{"properties":{"is_default":{"description":"Make it the address orders go to.","type":"boolean"},"label":{"description":"A name for it (\"Casa\"); empty removes it, left out (or null) keeps it.","type":["string","null"]}},"type":"object"}],"description":"A saved address, as the account page sends it."},"StorefrontCustomerCodeChannel":{"description":"How a code was delivered.","enum":["email","whatsapp"],"type":"string"},"StorefrontCustomerCodePurpose":{"description":"What a one-time code is for.","enum":["login","reset"],"type":"string"},"StorefrontCustomerCodeRequest":{"description":"Where to send a code: an e-mail, or a WhatsApp number.","properties":{"email":{"type":["string","null"]},"phone":{"description":"Sent by WhatsApp, when the platform has it.","type":["string","null"]},"purpose":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StorefrontCustomerCodePurpose","description":"Defaults to `login`."}]}},"type":"object"},"StorefrontCustomerCodeSent":{"description":"The code was sent (or would have been: the answer does not say whether an\naccount exists).","properties":{"channel":{"$ref":"#/components/schemas/StorefrontCustomerCodeChannel"},"expires_in_minutes":{"description":"How long the code stays valid.","format":"int64","type":"integer"},"sent_to":{"description":"Masked: `a***@exemplo.com`, `(11) *****-4321`.","type":"string"}},"required":["channel","sent_to","expires_in_minutes"],"type":"object"},"StorefrontCustomerCodeVerify":{"description":"The code a customer received, and where it went.","properties":{"code":{"description":"The 6 digits (other characters are ignored).","type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["code"],"type":"object"},"StorefrontCustomerCorrection":{"properties":{"pdf_url":{"description":"The path of `GET /storefront/customers/me/orders/{number}/corrections/{sequence}/pdf`.","type":"string"},"registered_at":{"format":"date-time","type":["string","null"]},"sequence":{"format":"int32","type":"integer"}},"required":["sequence","pdf_url"],"type":"object"},"StorefrontCustomerDelivery":{"description":"Where the order goes.","properties":{"estimate":{"description":"The carrier and its promise (\"até 6 dias úteis após o envio\"), or\nthe date it should arrive once shipped.","type":["string","null"]},"kind":{"description":"`shipping` or `pickup`.","type":"string"},"lines":{"description":"The address lines (or the pickup place).","items":{"type":"string"},"type":"array"}},"required":["kind","lines"],"type":"object"},"StorefrontCustomerLoginRequest":{"description":"E-mail and password of an existing account.","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"],"type":"object"},"StorefrontCustomerNfe":{"properties":{"access_key":{"type":["string","null"]},"danfe_url":{"description":"The DANFE (PDF), when there is one to show: the path of\n`GET /storefront/customers/me/orders/{number}/danfe` (call it with\nthe same headers), or the https link the store's invoicing gave.","type":["string","null"]},"number":{"type":["string","null"]}},"type":"object"},"StorefrontCustomerOrder":{"description":"One of the customer's orders, as listed.","properties":{"created_at":{"format":"date-time","type":"string"},"currency":{"description":"ISO 4217 code.","type":["string","null"]},"fulfillment_status":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"number":{"description":"Human order number, when assigned.","type":["string","null"]},"payment_status":{"type":["string","null"]},"status":{"description":"Order status (`pending`, `paid`, `shipped`, `delivered`, `cancelled`...).","type":"string"},"total_cents":{"format":"int64","type":["integer","null"]}},"required":["id","status","created_at"],"type":"object"},"StorefrontCustomerOrderDetail":{"properties":{"corrections":{"items":{"$ref":"#/components/schemas/StorefrontCustomerCorrection"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"delivery":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StorefrontCustomerDelivery"}]},"discount_cents":{"format":"int64","type":"integer"},"fulfillment_status":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"items":{"items":{"$ref":"#/components/schemas/StorefrontCustomerOrderItem"},"type":"array"},"nfe":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StorefrontCustomerNfe"}]},"number":{"type":"string"},"payment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StorefrontCustomerPayment"}]},"payment_status":{"type":["string","null"]},"shipments":{"items":{"$ref":"#/components/schemas/StorefrontCustomerShipment"},"type":"array"},"shipping_cents":{"format":"int64","type":"integer"},"status":{"type":"string"},"status_label":{"description":"Where it stands, in the customer's words (\"Em preparação\").","type":"string"},"steps":{"description":"Empty for cancelled and refunded orders.","items":{"$ref":"#/components/schemas/StorefrontCustomerOrderStep"},"type":"array"},"subtotal_cents":{"format":"int64","type":"integer"},"tone":{"description":"`attention` (waiting on the customer), `progress`, `done` or\n`cancelled`: how to color it.","type":"string"},"total_cents":{"format":"int64","type":"integer"}},"required":["id","number","status","status_label","tone","steps","created_at","currency","subtotal_cents","discount_cents","shipping_cents","total_cents","items","shipments","corrections"],"type":"object"},"StorefrontCustomerOrderItem":{"properties":{"id":{"format":"uuid","type":"string"},"image_url":{"type":["string","null"]},"quantity":{"format":"int32","type":"integer"},"stage":{"description":"`received`, `production`, `ready`, `shipped` or `delivered`; null\nfor orders not in progress (draft, cancelled).","type":["string","null"]},"stage_label":{"type":"string"},"title":{"type":"string"},"total_cents":{"format":"int64","type":"integer"},"unit_price_cents":{"format":"int64","type":"integer"}},"required":["id","title","quantity","unit_price_cents","total_cents","stage_label"],"type":"object"},"StorefrontCustomerOrderStep":{"description":"One step of an order as the customer follows it: placed, paid, being\nprepared (or made), shipped (or picked up), delivered.","properties":{"at":{"format":"date-time","type":["string","null"]},"key":{"description":"`placed`, `paid`, `preparing`, `shipped`, `delivered`.","type":"string"},"label":{"type":"string"},"note":{"description":"A line under the step: an expected date, a partial shipment.","type":["string","null"]},"state":{"description":"`done`, `current` or `upcoming`.","type":"string"}},"required":["key","label","state"],"type":"object"},"StorefrontCustomerPasswordReset":{"description":"A new password, with the code that allows it.","properties":{"code":{"description":"The code e-mailed by `POST /storefront/auth/code` with `purpose: reset`.","type":"string"},"email":{"type":"string"},"password":{"description":"At least 8 characters.","type":"string"}},"required":["email","code","password"],"type":"object"},"StorefrontCustomerPayment":{"description":"How the order is paid, and what is left to do.","properties":{"boleto_due_on":{"description":"When it is due, `dd/mm/aaaa`.","type":["string","null"]},"boleto_line":{"description":"Its linha digitável (digits only), to paste in a bank app.","type":["string","null"]},"boleto_line_formatted":{"description":"The linha digitável grouped as printed on the boleto.","type":["string","null"]},"boleto_pix_code":{"description":"A Pix copia-e-cola code that pays the same boleto, when the gateway\nissues one.","type":["string","null"]},"boleto_url":{"description":"While a boleto is waiting: the boleto to print or save.","type":["string","null"]},"expires_at":{"format":"date-time","type":["string","null"]},"method":{"description":"\"PIX\", \"Cartão de crédito\"...","type":"string"},"pix_code":{"description":"While a Pix is waiting: the copia-e-cola code and its QR image (a\n`data:` URL).","type":["string","null"]},"pix_qr":{"type":["string","null"]},"provider":{"description":"The gateway by name; empty when the store took it itself.","type":"string"},"status":{"description":"`paid`, `pending`, `expired`, `failed` or `refunded`.","type":"string"},"status_label":{"type":"string"}},"required":["method","provider","status","status_label"],"type":"object"},"StorefrontCustomerProduct":{"description":"Something the customer bought, with where it stands.","properties":{"image_url":{"type":["string","null"]},"order_number":{"type":"string"},"ordered_at":{"format":"date-time","type":"string"},"quantity":{"format":"int32","type":"integer"},"stage":{"type":["string","null"]},"stage_label":{"type":"string"},"title":{"type":"string"}},"required":["order_number","ordered_at","title","quantity","stage_label"],"type":"object"},"StorefrontCustomerProfile":{"description":"The signed-in customer.","properties":{"address":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StorefrontCustomerAddress","description":"Where their orders go: their default delivery address."}]},"addresses":{"description":"Every address they saved, the default first.","items":{"$ref":"#/components/schemas/StorefrontCustomerSavedAddress"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"date_of_birth":{"format":"date","type":["string","null"]},"document":{"description":"CPF (11 digits) or CNPJ (14), digits only.","type":["string","null"]},"email":{"type":["string","null"]},"fields":{"description":"Details the store lets them see and edit in their account (a nickname,\na size), each with its label, kind, choices and current value. Change\nthem with `custom_fields` on `PATCH /storefront/customers/me`.","items":{"$ref":"#/components/schemas/PortalField"},"type":"array"},"full_name":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"phone":{"type":["string","null"]}},"required":["id","addresses","fields","created_at"],"type":"object"},"StorefrontCustomerRegisterRequest":{"description":"A new customer account.","properties":{"email":{"type":"string"},"full_name":{"type":["string","null"]},"password":{"description":"At least 8 characters. Checked here; the password itself is chosen\nwhen the e-mail is verified (`POST /storefront/customers/verify`).","type":"string"},"phone":{"description":"Brazilian mobile or landline; validated and stored as E.164.","type":["string","null"]}},"required":["email","password"],"type":"object"},"StorefrontCustomerSavedAddress":{"allOf":[{"$ref":"#/components/schemas/StorefrontCustomerAddress"},{"properties":{"id":{"format":"uuid","type":"string"},"is_default":{"description":"Where orders go unless they choose another.","type":"boolean"},"label":{"description":"The name they gave it (\"Casa\", \"Trabalho\").","type":["string","null"]}},"required":["id","is_default"],"type":"object"}],"description":"One of the customer's saved addresses."},"StorefrontCustomerSession":{"description":"A customer session: send `token` as `Authorization: Bearer <token>` (next\nto the storefront key) to the account endpoints. Valid for 30 days, and\nonly in the store that issued it.","properties":{"customer":{"$ref":"#/components/schemas/StorefrontCustomerProfile"},"token":{"type":"string"}},"required":["token","customer"],"type":"object"},"StorefrontCustomerShipment":{"properties":{"box_count":{"format":"int32","type":"integer"},"carrier_name":{"type":["string","null"]},"delivered_at":{"format":"date-time","type":["string","null"]},"events":{"items":{"$ref":"#/components/schemas/StorefrontCustomerTrackingEvent"},"type":"array"},"shipped_at":{"format":"date-time","type":["string","null"]},"status":{"type":"string"},"status_label":{"description":"The status in the customer's words (\"A caminho\").","type":"string"},"tracking_code":{"type":["string","null"]},"tracking_url":{"description":"The carrier's tracking page, when it gave one.","type":["string","null"]}},"required":["status","status_label","box_count","events"],"type":"object"},"StorefrontCustomerTrackingEvent":{"properties":{"event":{"type":"string"},"occurred_at":{"format":"date-time","type":["string","null"]}},"required":["event"],"type":"object"},"StorefrontCustomerUpdate":{"properties":{"address":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StorefrontCustomerAddress","description":"Their default delivery address, replaced as a whole. CEP, street,\nnumber, neighborhood, city and UF are required; number may be \"s/n\"."}]},"custom_fields":{"description":"New values for the customer fields shown in their account (`fields`\non the profile), by key; `null` clears one. Other keys are refused.","type":["object","null"]},"date_of_birth":{"description":"`YYYY-MM-DD`. Empty clears it.","type":["string","null"]},"document":{"description":"CPF or CNPJ, with or without punctuation (check digits validated);\nstored as digits. Empty clears it.","type":["string","null"]},"email_opt_in":{"description":"Offers and news by e-mail: on or off, recorded as their consent.","type":["boolean","null"]},"full_name":{"type":["string","null"]},"phone":{"description":"Validated (DDD rules); stored as E.164. Empty clears it.","type":["string","null"]},"whatsapp_opt_in":{"description":"Offers and news by WhatsApp (needs a mobile on file).","type":["boolean","null"]}},"type":"object"},"StorefrontCustomerVerifyRequest":{"description":"Finish registration with the token from the verification e-mail.","properties":{"password":{"description":"At least 8 characters.","type":"string"},"token":{"description":"The `token` from the verification link (valid 15 minutes, single use).","type":"string"}},"required":["token","password"],"type":"object"},"StorefrontForm":{"description":"What a theme or the SDK needs to render a form.","properties":{"action":{"description":"Where to post a submission: a path on the API host\n(`POST /storefront/forms/{form_slug}/submissions`).","type":"string"},"fields":{"items":{"$ref":"#/components/schemas/StoreFormField"},"type":"array"},"name":{"type":"string"},"slug":{"type":"string"},"submit_label":{"type":["string","null"]},"success_message":{"type":["string","null"]},"turnstile_site_key":{"description":"Cloudflare Turnstile site key, when the platform checks it: render\nthe widget and send its token as `turnstile_token`.","type":["string","null"]}},"required":["slug","name","fields","action"],"type":"object"},"StorefrontFormSubmission":{"description":"A submission: field values by key, plus where it came from.","properties":{"_hp":{"description":"Honeypot: real visitors leave it empty.","type":["string","null"]},"fields":{"description":"Field key -> value (text, a list for checkboxes, true for consent).","type":"object"},"page_url":{"type":["string","null"]},"turnstile_token":{"description":"Cloudflare Turnstile token, when the form shows the widget.","type":["string","null"]}},"type":"object"},"StorefrontFormSubmitted":{"description":"A received submission.","properties":{"id":{"description":"The submission's id. A submission caught by the honeypot gets one too,\nbut nothing is stored under it.","format":"uuid","type":"string"},"message":{"description":"The form's thank-you message, to show the visitor.","type":"string"},"redirect_url":{"description":"Where to send the visitor next, when the form sets it (else show `message`).","type":["string","null"]}},"required":["id","message"],"type":"object"},"StorefrontInstallmentOption":{"description":"One installment plan for the card.","properties":{"first_installment_cents":{"description":"The first installment, in cents (it takes the division's remainder).","format":"int64","type":"integer"},"installment_amount":{"description":"Per installment, in reais.","format":"double","type":"number"},"installment_cents":{"description":"Each installment after the first, in cents.","format":"int64","type":"integer"},"installment_rate":{"description":"Interest rate, percent; 0 when interest-free. The store's monthly\nrate for its own interest, the gateway's rate for the gateway's.","format":"double","type":"number"},"installments":{"format":"int64","type":"integer"},"interest_by":{"description":"Who sets the interest: `store` (its own rate, charged in the amount)\nor `provider` (the gateway's, added by it); null when interest-free.","type":["string","null"]},"interest_cents":{"description":"Interest over the amount, in cents (0 when interest-free).","format":"int64","type":"integer"},"interest_free":{"type":"boolean"},"label":{"description":"Ready-made label, e.g. `6x de R$ 50,00 sem juros` or\n`12x de R$ 10,90 (total R$ 130,80)`.","type":"string"},"total_amount":{"description":"Total charged, in reais.","format":"double","type":"number"},"total_cents":{"description":"What the card is charged, in cents.","format":"int64","type":"integer"}},"required":["installments","installment_amount","total_amount","installment_rate","interest_free","label","installment_cents","first_installment_cents","total_cents","interest_cents"],"type":"object"},"StorefrontInstallments":{"description":"The installment plans for an amount.","properties":{"issuer_id":{"format":"int64","type":["integer","null"]},"options":{"description":"One per count the shopper may pick, from 1 (at most 12).","items":{"$ref":"#/components/schemas/StorefrontInstallmentOption"},"type":"array"},"payment_method_id":{"description":"Card brand as Mercado Pago names it (`visa`, `master`, ...); empty\nwhen unknown.","type":"string"}},"required":["payment_method_id","options"],"type":"object"},"StorefrontInvalidField":{"description":"Why a field was refused: a stable code and a message for the shopper.","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"StorefrontLocation":{"description":"A store location as shoppers see it.","properties":{"amenities":{"description":"Amenity labels, e.g. `estacionamento`.","items":{"type":"string"},"type":"array"},"city":{"type":["string","null"]},"complement":{"type":["string","null"]},"country":{"description":"ISO 3166-1 alpha-2 code.","type":"string"},"description":{"type":["string","null"]},"email":{"type":["string","null"]},"hours":{"description":"Opening hours by weekday (`monday` to `sunday`), each a list of\n`{open, close}` in `HH:MM`; a missing or empty day is closed.","type":"object"},"id":{"format":"uuid","type":"string"},"is_pickup_enabled":{"description":"Customers can pick orders up here.","type":"boolean"},"latitude":{"format":"double","type":["number","null"]},"longitude":{"format":"double","type":["number","null"]},"name":{"type":"string"},"neighborhood":{"type":["string","null"]},"number":{"type":["string","null"]},"phone":{"type":["string","null"]},"photos":{"items":{"$ref":"#/components/schemas/StoreLocationPhoto"},"type":"array"},"pickup_fee_cents":{"description":"Charged as shipping when picking up here, in cents.","format":"int64","type":"integer"},"pickup_instructions":{"type":["string","null"]},"pickup_lead_minutes":{"description":"How long after the order the pickup is ready.","format":"int32","type":"integer"},"postal_code":{"type":["string","null"]},"slug":{"type":"string"},"state":{"type":["string","null"]},"street":{"type":["string","null"]},"timezone":{"description":"IANA time zone the opening hours are in.","type":"string"},"whatsapp":{"type":["string","null"]}},"required":["id","slug","name","country","timezone","hours","photos","amenities","is_pickup_enabled","pickup_lead_minutes","pickup_fee_cents"],"type":"object"},"StorefrontMenu":{"description":"A menu of the site (`main`, `footer`...), as a theme's `site.menus` has it.","properties":{"handle":{"description":"The menu's name in the site: `main`, `footer`...","type":"string"},"items":{"items":{"$ref":"#/components/schemas/StorefrontMenuItem"},"type":"array"},"title":{"type":"string"}},"required":["handle","title","items"],"type":"object"},"StorefrontMenuItem":{"description":"A link in a menu, with the links under it (three levels at most).","properties":{"children":{"items":{"$ref":"#/components/schemas/StorefrontMenuItem"},"type":"array"},"title":{"type":"string"},"url":{"description":"A path on the store's domain, an outside address, or `#` when the item\nlinks nowhere.","type":"string"}},"required":["title","url","children"],"type":"object"},"StorefrontOrderPayment":{"description":"Where an order's payment stands, for the order page.","properties":{"boleto":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BoletoDetails","description":"While `waiting` by boleto: its link, linha digitável, barcode, due\ndate and, when the gateway issues one, the Pix that pays it."}]},"boleto_expires_at":{"description":"Until when the order waits for its boleto (the due date plus the\ndays a bank takes to report it), while `waiting` by boleto.","format":"date-time","type":["string","null"]},"currency":{"type":"string"},"intent_id":{"format":"uuid","type":["string","null"]},"method":{"description":"The last attempt's method (`pix`, `card`...).","type":["string","null"]},"order_id":{"format":"uuid","type":"string"},"order_status":{"type":"string"},"payable":{"description":"A new payment can be made for it (`failed`, `unpaid`, and `waiting`\nto switch methods).","type":"boolean"},"payment_status":{"type":["string","null"]},"pix":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StorefrontOrderPix","description":"While `waiting` by PIX."}]},"redirect_url":{"description":"While `waiting` on a card typed on the gateway's page (Asaas).","type":["string","null"]},"refunded_cents":{"description":"What was given back, in cents.","format":"int64","type":"integer"},"refusal_code":{"description":"Why the last attempt failed (`failed`): the gateway's code, and the\nsentence for the shopper.","type":["string","null"]},"refusal_message":{"type":["string","null"]},"state":{"description":"`paid`, `waiting` (a PIX or a boleto to pay, or a card page to finish),\n`processing` (a card the gateway is still deciding), `failed` (the\nlast attempt was refused or lapsed), `unpaid` (no attempt yet),\n`cancelled`, `refunded` or `partially_refunded`.","type":"string"},"total_cents":{"format":"int64","type":"integer"}},"required":["order_id","state","payable","order_status","total_cents","currency","refunded_cents"],"type":"object"},"StorefrontOrderPix":{"description":"A PIX code still payable.","properties":{"copy_paste":{"description":"The \"copia e cola\" code.","type":["string","null"]},"expires_at":{"format":"date-time","type":["string","null"]},"qr_code_base64":{"description":"The QR code, a PNG in base64.","type":["string","null"]}},"type":"object"},"StorefrontPayer":{"description":"Who pays, as typed at checkout.","properties":{"document":{"type":["string","null"]},"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]}},"type":"object"},"StorefrontPaymentIntent":{"description":"A payment attempt as the shopper's browser sees it.","properties":{"amount_cents":{"format":"int64","type":"integer"},"currency":{"type":"string"},"error_code":{"type":["string","null"]},"error_message":{"type":["string","null"]},"expires_at":{"description":"When an unpaid PIX code stops working, or until when the order waits\nfor a boleto (its due date plus the days a bank takes to report it).","format":"date-time","type":["string","null"]},"intent_id":{"format":"uuid","type":"string"},"method":{"$ref":"#/components/schemas/PaymentMethod"},"next_action":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PaymentNextAction","description":"What the shopper must do next, e.g. the PIX QR code and copy-paste\ncode for a pending PIX charge (`pix_qr`), or `{\"type\": \"redirect\",\n\"url\"}` for a card paid on the gateway's page (Asaas): send the\nshopper there; they come back to the order page."}]},"order_id":{"description":"The order the cart became.","format":"uuid","type":"string"},"provider_code":{"type":"string"},"snapshot":{"description":"What the browser may know of the gateway's answer: its `status` and\n`status_detail`, the PIX code and QR image\n(`point_of_interaction.transaction_data.qr_code`, `qr_code_base64`,\n`ticket_url`), a card page's `invoice_url` and a boleto's `boleto`\n(`BoletoDetails`). Nothing about the payer or the card.","type":"object"},"status":{"$ref":"#/components/schemas/PaymentIntentStatus"}},"required":["intent_id","order_id","status","amount_cents","currency","provider_code","method","snapshot"],"type":"object"},"StorefrontPaymentMethod":{"description":"A payment method the store takes, and the gateway behind it.","properties":{"method":{"$ref":"#/components/schemas/PaymentMethod"},"provider_code":{"description":"The gateway's code, such as `mercado_pago`, `banco_inter` or `asaas`.\nClients must tolerate new gateways.","type":"string"}},"required":["method","provider_code"],"type":"object"},"StorefrontPaymentMethods":{"description":"What the store accepts at checkout.","properties":{"card_public_key":{"description":"Mercado Pago public key, for its card tokenization SDK. Null when the\ncard gateway does not tokenize in the browser.","type":["string","null"]},"data":{"items":{"$ref":"#/components/schemas/StorefrontPaymentMethod"},"type":"array"},"saved_cards":{"description":"The store offers saved cards: a signed-in shopper may keep the card\n(`save_card`) and pay with it later (`listStorefrontSavedCards`).","type":"boolean"}},"required":["data","saved_cards"],"type":"object"},"StorefrontPopup":{"description":"A popup as the store's pages show it.","properties":{"body":{"type":"string"},"button_label":{"type":"string"},"capture":{"description":"`email`, `whatsapp` or `either`.","type":"string"},"consent_text":{"description":"The consent box's words; the box must be ticked.","type":"string"},"frequency_days":{"format":"int32","type":"integer"},"gives_code":{"description":"A signup gets a coupon.","type":"boolean"},"headline":{"type":"string"},"id":{"format":"uuid","type":"string"},"new_visitors_only":{"type":"boolean"},"success_text":{"type":"string"},"trigger":{"description":"`delay`, `scroll` or `exit`.","type":"string"},"trigger_value":{"format":"int32","type":"integer"},"turnstile_site_key":{"description":"Cloudflare Turnstile's site key, when signups need the widget.","type":["string","null"]}},"required":["id","headline","body","button_label","success_text","capture","consent_text","gives_code","trigger","trigger_value","frequency_days","new_visitors_only"],"type":"object"},"StorefrontPopupSignedUp":{"description":"What a signup got.","properties":{"code":{"description":"The visitor's coupon; null when the popup gives none (or the\ncoupons ran out).","type":["string","null"]},"message":{"description":"The popup's success text.","type":"string"}},"required":["message"],"type":"object"},"StorefrontPopupSignup":{"description":"A visitor's signup.","properties":{"_hp":{"description":"Honeypot: real visitors leave it empty.","type":["string","null"]},"consent":{"description":"The consent box was ticked (required).","type":"boolean"},"email":{"type":["string","null"]},"page_url":{"type":["string","null"]},"phone":{"description":"With DDD; Brazilian numbers without +55 are accepted.","type":["string","null"]},"turnstile_token":{"description":"Cloudflare Turnstile token, when the popup shows the widget.","type":["string","null"]}},"type":"object"},"StorefrontPrivacyRequestCreate":{"description":"A request about my data.","properties":{"details":{"description":"What they want, in their words (up to 2,000 characters).","type":["string","null"]},"kind":{"$ref":"#/components/schemas/StorefrontPrivacyRequestKind"}},"required":["kind"],"type":"object"},"StorefrontPrivacyRequestKind":{"description":"What a privacy request asks for.","enum":["deletion","correction","other"],"type":"string"},"StorefrontProductSubscription":{"description":"A recorded sign-up.","properties":{"created_at":{"format":"date-time","type":"string"},"email":{"type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"$ref":"#/components/schemas/ProductSubscriptionKind"},"product_id":{"format":"uuid","type":"string"},"status":{"description":"`active`: waiting for the product to be back or cheaper.","type":"string"},"variant_id":{"description":"The variant being watched, when the shopper chose one.","format":"uuid","type":["string","null"]}},"required":["id","product_id","email","kind","status","created_at"],"type":"object"},"StorefrontReferenceTable":{"description":"A reference table on a product: a palette of swatches, a size chart or\nthe dimensions of its shapes.","properties":{"columns":{"description":"The headings of the value columns, in the order of each entry's `values`.","items":{"type":"string"},"type":"array"},"description":{"description":"A note to show with it (how to measure), plain text.","type":["string","null"]},"entries":{"items":{"$ref":"#/components/schemas/StorefrontReferenceTableEntry"},"type":"array"},"id":{"format":"uuid","type":"string"},"image_url":{"description":"A picture to show with it (how to measure, the piece's shape).","type":["string","null"]},"kind":{"$ref":"#/components/schemas/ReferenceTableKind"},"name":{"description":"Its heading (\"Tabela de cores Lonita\", \"Guia de tamanhos\").","type":"string"},"source":{"$ref":"#/components/schemas/ReferenceTableSource","description":"Attached to the product itself, or inherited from a category or a collection."},"unit":{"description":"The unit of every value (`cm`); null when they carry none.","type":["string","null"]}},"required":["id","name","kind","columns","entries","source"],"type":"object"},"StorefrontReferenceTableEntry":{"description":"A swatch, a size or a shape of a reference table.","properties":{"code":{"description":"The swatch's code (\"LA45C075\").","type":["string","null"]},"color_hex":{"description":"`RRGGBB` (several joined by `/`), for a swatch without a picture.","type":["string","null"]},"image_large_url":{"description":"The picture at up to 1600 px wide.","type":["string","null"]},"image_thumb_url":{"description":"The picture at up to 400 px wide.","type":["string","null"]},"image_url":{"description":"The picture (a texture, a drawing) as uploaded.","type":["string","null"]},"label":{"description":"The swatch's name, the size, the shape.","type":"string"},"option":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VariantOption","description":"The product's option value this swatch stands for (match the variants'\n`options` with it to select one); null when the product has none."}]},"values":{"description":"One text per column.","items":{"type":"string"},"type":"array"}},"required":["label","values"],"type":"object"},"StorefrontRegistrationPending":{"description":"The answer to every registration request, whether or not the e-mail\nalready has an account (so the endpoint does not reveal which addresses\nare registered).","properties":{"email":{"description":"The normalized (trimmed, lower-case) address the link was sent to.","type":"string"},"expires_in_minutes":{"description":"How long the e-mailed link stays valid.","format":"int64","type":"integer"},"verification_required":{"description":"Always true: the account exists only after the e-mailed link is used.","type":"boolean"}},"required":["email","verification_required","expires_in_minutes"],"type":"object"},"StorefrontResellerApplicationCreate":{"allOf":[{"$ref":"#/components/schemas/ApplicationInput"},{"properties":{"_hp":{"description":"Leave empty: a bot fills it in.","type":["string","null"]},"turnstile_token":{"description":"The Cloudflare Turnstile token, when the store's page shows the widget.","type":["string","null"]}},"type":"object"}],"description":"A reseller sign-up request."},"StorefrontSavedCard":{"description":"A saved card, as the customer sees it.","properties":{"bin":{"description":"The card number's first six digits (its issuer's BIN), when the\ngateway says (Mercado Pago): the checkout asks for the gateway's\ninstallment rates with it, as for a card being typed.","type":["string","null"]},"brand":{"description":"The card's brand in lower case (`visa`, `master`, `elo`, `amex`,\n`hipercard`, ...), when the gateway says.","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"exp_month":{"format":"int32","type":["integer","null"]},"exp_year":{"format":"int32","type":["integer","null"]},"gateway_card_id":{"description":"Mercado Pago's id of the card, for MercadoPago.js to make a token\nfrom it and the CVV (`createCardToken({ cardId, securityCode })`).\nIt charges nothing on its own. Null for other gateways, whose\nreferences are never handed out.","type":["string","null"]},"holder_name":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"last4":{"description":"The card number's last four digits.","type":["string","null"]},"last_used_at":{"format":"date-time","type":["string","null"]},"needs_cvv":{"description":"Pay with it needs its CVV again (Mercado Pago).","type":"boolean"},"provider":{"description":"The gateway that keeps it: `mercado_pago` or `asaas`. Only cards of\nthe store's card gateway can pay (`usable`).","type":"string"},"usable":{"description":"The store's card gateway can charge it now.","type":"boolean"}},"required":["id","provider","needs_cvv","usable","created_at"],"type":"object"},"StorefrontShippingEstimate":{"description":"Shipping options for a set of variants, without a cart.","properties":{"destination_postal_code":{"description":"CEP, digits only.","type":"string"},"expires_at":{"format":"date-time","type":["string","null"]},"free_shipping":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FreeShippingProgress","description":"What these items still need for free shipping to this CEP; null when no\nfree-shipping rule can apply."}]},"options":{"description":"The options offered, after the store's shipping rules.","items":{"$ref":"#/components/schemas/StorefrontShippingEstimateOption"},"type":"array"},"provider_code":{"type":"string"},"quotation_code":{"type":["string","null"]},"simulated_item_count":{"format":"int32","type":"integer"},"simulated_subtotal_cents":{"format":"int64","type":"integer"}},"required":["provider_code","destination_postal_code","options","simulated_item_count","simulated_subtotal_cents"],"type":"object"},"StorefrontShippingEstimateItem":{"description":"One line of a shipping estimate.","properties":{"quantity":{"format":"int32","minimum":1,"type":"integer"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","quantity"],"type":"object"},"StorefrontShippingEstimateOption":{"description":"One option of a shipping estimate: a carrier service or a local delivery\nzone, priced by the store's shipping rules. (`inventory::freight::rules::RuledOption`\nas it serializes, written out so the document lists every field.)","properties":{"base_shipping_cents":{"description":"What the carrier quoted before the store's shipping rules; equal to\n`shipping_cents` when no rule changed the price.","format":"int64","type":["integer","null"]},"boxes":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/QuotedBoxes","description":"The boxes this option was quoted for."}]},"carrier_name":{"type":["string","null"]},"delivery_days":{"format":"int32","type":["integer","null"]},"option_id":{"type":"string"},"provider_code":{"description":"Which module produced this option (`central_do_frete`,\n`local_delivery`, ...). Clients must tolerate new codes.","type":"string"},"quotation_code":{"description":"The provider's own quotation reference for this option, when it has one.","type":["string","null"]},"raw":{"description":"The carrier's own option payload.","type":"object"},"service_name":{"type":"string"},"shipping_cents":{"description":"What the shopper pays, after the store's shipping rules.","format":"int64","type":"integer"},"shipping_rule":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AppliedShippingRule","description":"The shipping rule that changed this option; absent when none did."}]}},"required":["option_id","service_name","shipping_cents","raw"],"type":"object"},"StorefrontShippingEstimateRequest":{"description":"Estimate shipping for a set of variants without a cart (product page).","properties":{"channel":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ShippingRuleChannel","description":"Where the sale is made, for shipping rules limited to some channels.\nDefaults to `storefront`; the admin's point of sale sends `pos`."}]},"destination_postal_code":{"description":"CEP, with or without the dash (8 digits).","type":"string"},"items":{"items":{"$ref":"#/components/schemas/StorefrontShippingEstimateItem"},"type":"array"},"whatsapp":{"description":"Shopper's WhatsApp, passed to carriers that want a recipient.","type":["string","null"]}},"required":["destination_postal_code","items"],"type":"object"},"StorefrontShippingOption":{"description":"A shipping option of the cart's last quote.","properties":{"base_shipping_cents":{"description":"What the carrier quoted before the store's shipping rules; equal to\n`shipping_cents` when no rule changed the price (show it struck\nthrough when it is higher).","format":"int64","type":"integer"},"carrier_name":{"type":["string","null"]},"delivery_days":{"description":"Business days to deliver, when the carrier says.","format":"int32","type":["integer","null"]},"logo":{"type":["string","null"]},"option_id":{"description":"What to send to `PUT .../shipping-option`.","type":"string"},"provider_code":{"description":"Which module produced this option (`central_do_frete`,\n`local_delivery`, ...). Clients must tolerate new codes.","type":"string"},"service_name":{"type":"string"},"service_type":{"type":["string","null"]},"shipping_cents":{"format":"int64","type":"integer"}},"required":["option_id","service_name","shipping_cents","provider_code","base_shipping_cents"],"type":"object"},"SubmittedReview":{"allOf":[{"$ref":"#/components/schemas/ProductReview"},{"properties":{"status":{"$ref":"#/components/schemas/ReviewStatus"}},"required":["status"],"type":"object"}],"description":"The review as stored for its author. `status` is `pending` when the\nstore moderates reviews: it shows up once approved."},"TierStanding":{"description":"Where a customer stands among the tiers.","properties":{"current":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LoyaltyTier","description":"The tier they are in now; none below the lowest."}]},"next":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LoyaltyTier","description":"The next tier up, if there is one."}]},"spend_cents":{"description":"What they paid for goods in the last `window_months`.","format":"int64","type":"integer"},"to_next_cents":{"description":"What is still to spend to reach it.","format":"int64","type":["integer","null"]},"window_months":{"description":"The window the spend is counted over, in months.","format":"int32","type":"integer"}},"required":["spend_cents","window_months"],"type":"object"},"UseWallet":{"description":"Whether to spend the wallet.","properties":{"use_wallet":{"type":"boolean"}},"required":["use_wallet"],"type":"object"},"VariantOption":{"description":"One option of a variant, e.g. `Cor: Azul`.","properties":{"name":{"description":"The option group, e.g. `Cor`.","type":"string"},"value":{"description":"The chosen value, e.g. `Azul`.","type":"string"}},"required":["name","value"],"type":"object"},"WaitlistEntry":{"description":"Someone waiting for a time.","properties":{"client_email":{"type":["string","null"]},"client_name":{"type":"string"},"client_phone":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","type":["string","null"]},"day":{"description":"The day wanted, in the provider's zone.","format":"date","type":"string"},"id":{"format":"uuid","type":"string"},"notified_at":{"format":"date-time","type":["string","null"]},"provider_id":{"format":"uuid","type":["string","null"]},"provider_name":{"type":["string","null"]},"service_id":{"format":"uuid","type":"string"},"service_name":{"type":"string"},"status":{"description":"`waiting`, `notified` or `removed`.","type":"string"}},"required":["id","service_id","service_name","day","client_name","status","created_at"],"type":"object"},"WholesaleIssue":{"description":"What keeps a reseller's cart from checking out, with the words the cart shows.","properties":{"code":{"description":"`min_order` (the order is under the group's minimum), `min_quantity` (fewer units of a product than the\nminimum), `pack_size` (a product's units are not a multiple of its pack) or `not_available` (a product the\ngroup does not buy). More may come; show `message` for one you do not know.","type":"string"},"current":{"description":"What the cart has: its goods in cents, or the product's units.","format":"int64","type":["integer","null"]},"message":{"description":"Ready to show, in Portuguese.","type":"string"},"product_id":{"description":"The product, for the per-product codes.","format":"uuid","type":["string","null"]},"required":{"description":"What the rule asks for: the minimum order in cents, the minimum or the pack in units.","format":"int64","type":["integer","null"]}},"required":["code","message"],"type":"object"},"WidgetBootstrap":{"description":"How the chat widget looks and greets.","properties":{"avatar_url":{"type":"string"},"bot_enabled":{"type":"boolean"},"bot_name":{"type":"string"},"brand":{"description":"Brand tokens (colors, fonts, logo) from the store's brand system.\nNull when the store has none.","type":["object","null"]},"collect_contact":{"description":"Ask for name and e-mail.","type":"boolean"},"color":{"description":"Accent color, `#rrggbb`.","type":"string"},"greeting":{"type":"string"},"launcher_text":{"type":"string"},"offline_message":{"type":"string"},"online":{"description":"Someone (a team member or the bot) answers now.","type":"boolean"},"position":{"description":"`right` or `left`.","type":"string"},"privacy_url":{"type":"string"},"require_contact":{"description":"Require them before the first message.","type":"boolean"},"starters":{"description":"Suggested first messages (when the bot is on).","items":{"type":"string"},"type":"array"},"store_name":{"type":"string"},"subtitle":{"type":"string"},"title":{"type":"string"}},"required":["starters","store_name","title","subtitle","color","position","launcher_text","avatar_url","greeting","offline_message","collect_contact","require_contact","bot_name","bot_enabled","online","privacy_url"],"type":"object"},"WidgetCartResponse":{"description":"The shopper's view of the cart.","properties":{"cart":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationCart","description":"Null until the team or the bot adds something."}]}},"type":"object"},"WidgetContactRequest":{"properties":{"email":{"type":["string","null"]},"name":{"type":["string","null"]},"phone":{"type":["string","null"]}},"type":"object"},"WidgetConversation":{"description":"The shopper's view of their conversation.","properties":{"assigned":{"description":"A team member took the conversation.","type":"boolean"},"bot_active":{"description":"The bot is answering.","type":"boolean"},"contact_email":{"type":["string","null"]},"contact_name":{"type":["string","null"]},"contact_phone":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"csat_score":{"format":"int32","type":["integer","null"]},"id":{"format":"uuid","type":"string"},"status":{"$ref":"#/components/schemas/ConversationStatus"},"unread_for_visitor":{"description":"Team and bot messages the shopper has not read.","format":"int32","type":"integer"}},"required":["id","status","bot_active","assigned","unread_for_visitor","created_at"],"type":"object"},"WidgetCsatRequest":{"properties":{"comment":{"type":["string","null"]},"score":{"description":"1 to 5.","format":"int32","type":"integer"}},"required":["score"],"type":"object"},"WidgetMessage":{"description":"A chat message as the shopper sees it.","properties":{"created_at":{"format":"date-time","type":"string"},"delivery_status":{"$ref":"#/components/schemas/MessageDeliveryStatus"},"id":{"format":"uuid","type":"string"},"payload":{"$ref":"#/components/schemas/ConversationMessagePayload","description":"Product cards, quick replies, the cart or a PIX charge."},"read_at":{"format":"date-time","type":["string","null"]},"sender":{"$ref":"#/components/schemas/ConversationMessageSender"},"text":{"type":"string"}},"required":["id","sender","text","payload","delivery_status","created_at"],"type":"object"},"WidgetSendRequest":{"properties":{"payload":{"type":["object","null"]},"text":{"description":"Up to 4000 characters.","type":"string"}},"required":["text"],"type":"object"},"WidgetSendResponse":{"properties":{"conversation":{"$ref":"#/components/schemas/WidgetConversation"},"message":{"$ref":"#/components/schemas/WidgetMessage"}},"required":["message","conversation"],"type":"object"},"WidgetStartRequest":{"properties":{"attributes":{"description":"Page context (`page_url`, `referrer`, `locale`...).","type":["object","null"]},"email":{"type":["string","null"]},"identity":{"description":"A signed identity from the site's server, when the visitor is signed\nin there. The name and e-mail then come from it, and the\nconversation is marked verified (`attributes.identity`).","type":["string","null"]},"marketing_visitor_id":{"description":"On the store's own site: the storefront tracker's visitor id (the\n`_bp_visitor` cookie). The conversation takes its origin from that\nbrowser's visits. Ignored unless it is a UUID.","type":["string","null"]},"name":{"type":["string","null"]},"phone":{"type":["string","null"]},"text":{"description":"Optional first message sent together with the opening.","type":["string","null"]},"visitor_id":{"description":"A stable id for this browser, to recognise returning visitors.","type":["string","null"]}},"type":"object"},"WidgetStartResponse":{"properties":{"conversation":{"$ref":"#/components/schemas/WidgetConversation"},"message":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/WidgetMessage","description":"The first message, when `text` was sent."}]},"token":{"description":"Proves ownership of the conversation: send it as `X-Visitor-Token`\non every later call and keep it with the conversation id.","type":"string"}},"required":["conversation","token"],"type":"object"},"WidgetThread":{"description":"The chat and its latest messages.","properties":{"conversation":{"$ref":"#/components/schemas/WidgetConversation"},"messages":{"description":"The latest 200 messages, oldest first. Team assignment notices are\nleft out.","items":{"$ref":"#/components/schemas/WidgetMessage"},"type":"array"}},"required":["conversation","messages"],"type":"object"},"Wishlist":{"description":"The shopper's list.","properties":{"alerts":{"description":"Signed in: saved products send back-in-stock and price-drop e-mails\nwhile this is true. Always false for a visitor.","type":"boolean"},"items":{"description":"Newest first, at most 200 (the size of a list), so it is not paged.","items":{"$ref":"#/components/schemas/WishlistItem"},"type":"array"},"signed_in":{"description":"Whether the list belongs to a signed-in customer (else to a visitor).","type":"boolean"}},"required":["items","alerts","signed_in"],"type":"object"},"WishlistIds":{"description":"Which products are saved: enough to colour the hearts.","properties":{"product_ids":{"items":{"format":"uuid","type":"string"},"type":"array"}},"required":["product_ids"],"type":"object"},"WishlistItem":{"description":"One saved product.","properties":{"handle":{"description":"The product's slug.","type":"string"},"in_stock":{"description":"A variant is in stock.","type":"boolean"},"price_cents":{"description":"The lowest price a shopper pays now, in cents.","format":"int64","type":["integer","null"]},"product_id":{"format":"uuid","type":"string"},"saved_at":{"format":"date-time","type":"string"},"saved_price_cents":{"description":"The lowest price when it was saved.","format":"int64","type":["integer","null"]},"title":{"type":"string"},"variant_id":{"description":"The variant the shopper had chosen, if any.","format":"uuid","type":["string","null"]}},"required":["product_id","title","handle","in_stock","saved_at"],"type":"object"},"WishlistSettings":{"description":"The list's settings.","properties":{"alerts":{"description":"Send back-in-stock and price-drop e-mails for saved products.","type":"boolean"}},"required":["alerts"],"type":"object"},"WishlistShare":{"description":"A link to the signed-in customer's list.","properties":{"path":{"description":"Where the store's site shows it: `/favoritos/compartilhada/{token}`.","type":"string"},"token":{"description":"The secret in the link.","type":"string"}},"required":["token","path"],"type":"object"}},"securitySchemes":{"channel_key":{"description":"A sales channel's API key, generated in the admin under the channel.","in":"header","name":"X-Channel-Key","type":"apiKey"},"customer_auth":{"bearerFormat":"customer session token","description":"`Authorization: Bearer <token>` with the token from the store's customer login or register call. Valid for 30 days, only in the store that issued it.","scheme":"bearer","type":"http"},"storefront_key":{"description":"The store's publishable key (`pk_live_…`), created under Sales Channels in the admin. Safe to ship in browser and mobile code. On a store's own domain it may be omitted: the host identifies the store.","in":"header","name":"X-Storefront-Key","type":"apiKey"}}},"info":{"description":"The shopper-facing API for themes and headless storefronts: catalog, cart, checkout and customer accounts.\n\nIdentify the store with its publishable key in `X-Storefront-Key: pk_live_…` (create keys under Sales Channels in the admin). The key is safe to ship in browser and mobile code: it can only do what a shopper can. Signed-in customers also send `Authorization: Bearer <customer token>`. Conventions that hold for every endpoint (errors, pagination, idempotency, rate limits) are described at https://docs.mobiari.com/docs/api-conventions.","license":{"name":""},"title":"Mobiari Storefront API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/channel/orders":{"post":{"description":"Records a `pending` order on the sales channel from an external\nstorefront's cart. The customer is found by e-mail or phone, or created.\nTotals are computed from the prices the request sends\n(`items[].unit_price_cents`, `shipping.price_cents`, `discount_rate` as a\nfraction of the subtotal), not from the catalog, except for lines that\nomit their price, which take the catalog's current price. No stock is\nreserved and no payment is taken. Lines whose product or variant is not\nan active one of this store are skipped; the call fails when none\nremains. The order and its lines are written together or not at all.","operationId":"createChannelOrder","parameters":[{"description":"A unique value per order. A retry with the same key within 24 hours returns the first response instead of creating another order","in":"header","name":"Idempotency-Key","required":false,"schema":{"type":["string","null"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelOrderRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelOrder"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`channel_key_required` or `invalid_channel_key`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: no lines, a bad quantity or price, a discount outside 0 to 1, or `no_valid_items`: none of the lines is an active product of this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"channel_key":[]}],"summary":"Create an order","tags":["Channel API"]}},"/storefront/auth/code":{"post":{"description":"E-mails (or sends by WhatsApp) a 6-digit code, valid 10 minutes, to sign\nin with `POST /storefront/auth/code/verify`; `purpose: reset` sends one to\nset a new password (`POST /storefront/auth/password-reset`). The answer is\nthe same whether or not an account exists; a WhatsApp code only goes to\na number a customer already has on file. A code that could not be sent\n(the e-mail or WhatsApp provider refused it) is withdrawn and answered\n`502 code_not_sent`, so the form never says it went out.","operationId":"sendStorefrontCustomerCode","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerCodeRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerCodeSent"}}},"description":"Accepted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` (`details.fields`), or `whatsapp_unavailable`: the platform cannot send WhatsApp codes right now"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: too many codes asked from this address or for this destination","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`code_not_sent`: the code could not be delivered right now; ask again in a moment"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Send a sign-in code","tags":["Account"]}},"/storefront/auth/code/verify":{"post":{"description":"Starts a session: an HttpOnly cookie on the store's domain, and `token`\nfor headless sites (`Authorization: Bearer`). An e-mail with no account\nyet becomes a customer, its address verified by the code.","operationId":"verifyStorefrontCustomerCode","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerCodeVerify"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerSession"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`code_invalid`: wrong, expired or already used code (also after 5 wrong tries); or `validation_failed` for the e-mail or phone"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: too many attempts from this address","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Sign in with a code","tags":["Account"]}},"/storefront/auth/login":{"post":{"description":"Exchanges e-mail and password for a customer session token. Themes served\nfrom the store's own domain also get the HttpOnly session cookie.","operationId":"loginStorefrontCustomer","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerLoginRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerSession"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_credentials`: wrong e-mail or password (also for accounts without a password)"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: too many attempts from this address or for this e-mail","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Sign a customer in","tags":["Account"]}},"/storefront/auth/logout":{"post":{"description":"Ends the cookie session (the response clears the cookie). A bearer token is\na signed, stateless credential and cannot be revoked: headless clients\nsign out by discarding it.","operationId":"logoutStorefrontCustomer","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"204":{"description":"Signed out"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Sign out","tags":["Account"]}},"/storefront/auth/password-reset":{"post":{"description":"With the code from `POST /storefront/auth/code` (`purpose: reset`). Every\nother session of the customer is signed out, and this one is signed in,\nlike a code sign-in.","operationId":"resetStorefrontCustomerPassword","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerPasswordReset"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerSession"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`code_invalid` (wrong, expired or used code), or `validation_failed` (`details.fields`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Set a new password","tags":["Account"]}},"/storefront/bookings":{"post":{"description":"Books a time and e-mails the confirmation. The answer carries `token`,\nthe client's only key to see, move or cancel it. 409 `slot_unavailable`\nwhen the time is not on offer, `slot_taken` when someone took it a moment\nago.","operationId":"createStorefrontBooking","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booked"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bookings_disabled` or `service_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`slot_unavailable`, `slot_taken`, `class_full`, `already_booked` or `package_used_up`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_name`, `invalid_email`, `invalid_phone`, `contact_required`, `service_inactive`, `no_provider`, `intake_required`, `invalid_intake_answer`, `consent_required`, a `package_*` code, or `payment_unavailable` / `pix_intent_failed` (the deposit could not be charged; nothing was booked)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited` or `too_many_open_bookings`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Book","tags":["Bookings"]}},"/storefront/bookings/availability":{"get":{"description":"The start times a client can book for a service between two local days\n(at most 31). Each slot names the provider who would take it. Book one\nexactly as returned.","operationId":"getStorefrontBookingAvailability","parameters":[{"in":"query","name":"service_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"provider_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"First local day, `YYYY-MM-DD`.","in":"query","name":"from","required":true,"schema":{"format":"date","type":"string"}},{"description":"Last local day, at most 31 days after `from`.","in":"query","name":"to","required":true,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BookingSlot"},"type":"array"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bookings_disabled` or `service_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_range` or `service_inactive`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Times free","tags":["Bookings"]}},"/storefront/bookings/packages":{"post":{"description":"One of `package_plans`, paid by Pix. Once paid, its code is e-mailed.","operationId":"buyStorefrontBookingPackage","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuyPackage"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageBought"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`package_plan_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`email_required`, the contact codes, `payment_unavailable` or `pix_intent_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Buy a package","tags":["Bookings"]}},"/storefront/bookings/packages/{code}":{"get":{"description":"What is left of a client's package. Rate limited.","operationId":"getStorefrontBookingPackage","parameters":[{"description":"The package's code, as e-mailed (dashes and case do not matter)","in":"path","name":"code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPackage"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`package_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"A package by its code","tags":["Bookings"]}},"/storefront/bookings/services":{"get":{"description":"The active services with the providers who deliver them, and the store's\nname. 404 `bookings_disabled` while the store has online booking off.","operationId":"listStorefrontBookingServices","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingPage"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bookings_disabled`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Bookable services","tags":["Bookings"]}},"/storefront/bookings/waitlist":{"post":{"description":"For a day with no time left: the client is e-mailed if a time opens. A\ncontact can wait for 3 days at once.","operationId":"joinStorefrontBookingWaitlist","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinWaitlist"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistEntry"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`waitlist_limit`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`waitlist_disabled`, `invalid_day` and the contact codes"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Join the waitlist","tags":["Bookings"]}},"/storefront/bookings/{token}":{"get":{"description":"By the token the booking answered with.","operationId":"getStorefrontBooking","parameters":[{"description":"The booking's private token","in":"path","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicBooking"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`booking_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"A booking","tags":["Bookings"]}},"/storefront/bookings/{token}/availability":{"get":{"description":"The booking's own provider, between two local days (at most 31).","operationId":"getStorefrontBookingReschedulingSlots","parameters":[{"description":"The booking's private token","in":"path","name":"token","required":true,"schema":{"type":"string"}},{"in":"query","name":"from","required":true,"schema":{"format":"date","type":"string"}},{"in":"query","name":"to","required":true,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BookingSlot"},"type":"array"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`booking_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Times free to move a booking to","tags":["Bookings"]}},"/storefront/bookings/{token}/cancel":{"post":{"description":"Frees the time. 409 `cancel_window_closed` once the service's cutoff has\npassed (the shop's team can still cancel).","operationId":"cancelStorefrontBooking","parameters":[{"description":"The booking's private token","in":"path","name":"token","required":true,"schema":{"type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientCancel"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicBooking"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`booking_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cancel_window_closed` or `invalid_state`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Cancel a booking","tags":["Bookings"]}},"/storefront/bookings/{token}/reschedule":{"post":{"description":"To one of the times the rescheduling availability call returned, with the\nsame provider. 409 `cancel_window_closed`, `slot_unavailable` or\n`slot_taken`.","operationId":"rescheduleStorefrontBooking","parameters":[{"description":"The booking's private token","in":"path","name":"token","required":true,"schema":{"type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientReschedule"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicBooking"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`booking_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cancel_window_closed`, `slot_unavailable`, `slot_taken` or `invalid_state`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Move a booking","tags":["Bookings"]}},"/storefront/carts":{"post":{"description":"Opens an empty cart for the shopper and answers with it. Keep its `id`\n(the shopper's browser can hold it in local storage) and use it in every\ncart route: `/carts/{cart_id}/...`. Carts are open until checkout and\nexpire when abandoned.","operationId":"createStorefrontCart","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StorefrontCartCreateRequest"}]}}},"description":"Optional: send nothing for the store's currency"},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCart"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: not an ISO 4217 currency code"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a cart","tags":["Cart"]}},"/storefront/carts/{cart_id}":{"get":{"description":"The shopper's open cart, priced as checkout will charge it. `cart_id` is\nthe id from `POST /carts`, or `current` for the cart named by the\n`cart_id` cookie (what themes use). An unknown or finished cart is a 404\n`cart_not_found`: create a new one.","operationId":"getStorefrontCart","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCart"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`: no open cart with this id in the store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a cart","tags":["Cart"]}},"/storefront/carts/{cart_id}/checkout":{"post":{"description":"Turns the cart into an order (if it is not one already) and answers with\nit once a payment for it is approved. Pay through\n`POST /storefront/carts/{cart_id}/payments`, which also creates the\norder; call this to confirm the outcome, for example after the shopper\nreturns from a bank page or a Pix payment was approved.","operationId":"checkoutStorefrontCart","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCheckoutResult"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The cart is empty"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`sign_in_required`: the store sells to signed-in customers only"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`insufficient_stock`: not enough stock for a line"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`payment_required`: no approved payment yet (`details` has `order_id` and `cart_id`), `shipping_required`: no shipping option chosen, `address_required`: the cart contact has no billing address (street, CEP, city, state; pickup included), or `wholesale_rules_unmet`: the cart breaks the customer's wholesale rules (`details.issues`, as the cart's `wholesale_issues`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Complete checkout","tags":["Checkout"]}},"/storefront/carts/{cart_id}/contact":{"patch":{"description":"Stores the shopper's name, e-mail, phone, address and document on the\ncart, so an abandoned cart can be recovered and checkout pre-filled.\nSend the whole form: every field you send replaces the stored one,\nexcept `document`, which a blank value does not erase. On `current`,\nstarts a cart when the shopper has none.\n\nThe draft saves as the shopper types, so a value that fails validation is\nkept as typed and reported in the answer's `contact_draft.invalid_fields`\n(CPF/CNPJ check digits, phone with a real DDD, e-mail, CEP, UF); checkout\nasks for a fix. Valid values are stored in canonical form (digits, E.164\nphone). The details are untrusted: they are not matched against the\nstore's customers here, and the answer is the same whether or not they\nbelong to one. On a quote whose seller fixed the delivery address (or the\nshipping), the address fields are not changed; the rest is saved.","operationId":"updateStorefrontCartContact","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCartContactUpsertRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCart"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Save the checkout contact details","tags":["Cart"]}},"/storefront/carts/{cart_id}/credit":{"get":{"description":"The gift cards (shown by their last four characters) and the wallet the\ncart is set to spend, with the estimate of what each would pay. Nothing is\ntaken until the order is charged.","operationId":"getStorefrontCartCredit","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartCredit"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`: no open cart with this id"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"What credit the cart pays with","tags":["Cart"]}},"/storefront/carts/{cart_id}/credit/gift-cards":{"post":{"description":"Adds the card by its code; a cart can use several, spent in the order they\nwere added. Adding a card already on the cart changes nothing. Nothing is\ntaken until the order is charged. Codes are looked up at a limited rate.\nAnswers the cart's credit.","operationId":"addStorefrontCartGiftCard","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddGiftCard"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartCredit"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`, or `gift_card_not_found`: no card with this code in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`gift_card_order`: a cart that buys gift cards cannot be paid with credit"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`gift_card_disabled`, `gift_card_expired` or `gift_card_empty`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: too many code lookups from this address","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Pay the cart with a gift card","tags":["Cart"]}},"/storefront/carts/{cart_id}/credit/gift-cards/{account_id}":{"delete":{"description":"Takes the card off the cart (one that is not on it is a no-op). Answers\nthe cart's credit.","operationId":"removeStorefrontCartGiftCard","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}},{"description":"The `account_id` of the card in the cart's credit","in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartCredit"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Stop paying the cart with a gift card","tags":["Cart"]}},"/storefront/carts/{cart_id}/credit/wallet":{"put":{"description":"For a signed-in customer: turns on or off spending their store credit on\nthis cart. Taken, like a gift card, when the order is charged. The cart\nbecomes the customer's. Answers the cart's credit.","operationId":"setStorefrontCartWallet","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UseWallet"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartCredit"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`gift_card_order`: a cart that buys gift cards cannot be paid with credit"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`wallet_empty`: nothing to spend"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Pay the cart with the customer's wallet","tags":["Cart"]}},"/storefront/carts/{cart_id}/discount-code":{"delete":{"description":"Takes the code and its discount off the cart. Nothing happens when the\ncart holds no code of the shopper's (an offer made in a conversation, or a\nquote's price, stays). Answers with the whole cart.","operationId":"removeStorefrontCartDiscountCode","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCart"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Remove the cart's discount code","tags":["Cart"]},"put":{"description":"Checks the code against the cart (active, in its window, above its\nminimum, under its usage limit, on the products it is limited to, for\nthis customer, alongside the cart's promotions) and takes its amount off\nthe total; it follows the lines as they change and is let go when it\nstops applying. A cart holds one code: applying another replaces it. The\nuse is taken at checkout, not here, where a guest's per-customer rules\nare checked too. Carts whose price was negotiated (a quote, an offer made\nin a conversation) refuse. Answers with the whole cart.","operationId":"applyStorefrontCartDiscountCode","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCartDiscountCodeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCart"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_price_negotiated`: the cart's price was agreed with the seller; `gift_card_not_discountable`: gift cards take no discount"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The code does not apply; `code` is `not_found`, `not_started`, `expired`, `below_minimum`, `usage_limit_reached`, `no_eligible_items`, `below_minimum_quantity`, `first_purchase_only`, `already_used`, `not_eligible_customer` or `not_combinable`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Apply a discount code to the cart","tags":["Cart"]}},"/storefront/carts/{cart_id}/fulfillment":{"put":{"description":"With `method: \"pickup\"` and a `pickup_location_id` (from\n`GET /storefront/locations?pickup=true`), the cart switches to pickup at\nthat store location: the shipping option is cleared and the location's\npickup fee becomes `shipping_cents`. With `method: \"shipping\"` the cart\ngoes back to shipping and needs a shipping option again. Answers with the\nwhole cart.","operationId":"setStorefrontCartFulfillment","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCartFulfillmentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCart"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`pickup_location_required`, or `pickup_unavailable`: the location does not offer pickup"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`, or no such location"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`quote_freight_locked`: the cart is a quote whose seller fixed its shipping"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Choose pickup or shipping","tags":["Cart"]}},"/storefront/carts/{cart_id}/gift-card-items":{"post":{"description":"One line per card: add again for another. On `current`, starts a cart\nwhen the shopper has none. A cart holds gift cards or goods, not both.\nAnswers with the whole cart.","operationId":"addStorefrontCartGiftCardItem","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCartGiftCardAdd"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCart"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`, or the variant is not a gift card"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`gift_card_cart_mixed` (the cart holds goods) or `too_many_gift_cards`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_email` or `invalid_delivery_date`; `invalid_amount` (a typed amount outside the card limits) or `custom_amount_not_allowed` (the product takes only its fixed values)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Add a gift card to the cart","tags":["Cart"]}},"/storefront/carts/{cart_id}/gift-card-items/{item_id}":{"delete":{"description":"Answers with the whole cart.","operationId":"removeStorefrontCartGiftCardItem","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}},{"description":"The cart line (`items[].id`)","in":"path","name":"item_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCart"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`, or no such gift card line"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Take a gift card out of the cart","tags":["Cart"]}},"/storefront/carts/{cart_id}/items":{"post":{"description":"Adds `quantity` (default 1) of a variant to the cart, on top of what the\ncart already holds of it. Stock is reserved for the cart and any selected\nshipping option is cleared, since the parcel changed. On `current`, starts\na cart when the shopper has none. Answers with the whole cart.","operationId":"addStorefrontCartItem","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCartItemAddRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCart"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`sign_in_required`: the store shows prices to signed-in customers only"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`, or `variant_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`insufficient_stock` (`details` has `available`, `max_shippable` and `limiting_sku`), `quote_items_locked`: a quote whose seller fixed its shipping, or `not_available_to_group`: the customer's group does not buy this product"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`gift_card_cart_mixed`: a cart holds gift cards or goods, never both"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Add to the cart","tags":["Cart"]}},"/storefront/carts/{cart_id}/items/{variant_id}":{"delete":{"description":"Releases the line's stock reservation and clears any selected shipping\noption. Answers with the whole cart.","operationId":"removeStorefrontCartItem","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCart"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`quote_items_locked`: the cart is a quote whose seller fixed its shipping, so its lines cannot change"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Remove a cart line","tags":["Cart"]},"put":{"description":"Sets the variant's quantity in the cart, adding the line if needed; `0`\nremoves it. Stock is reserved for the cart and any selected shipping\noption is cleared, since the parcel changed. On `current`, starts a cart\nwhen the shopper has none. Answers with the whole cart.","operationId":"setStorefrontCartItem","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCartItemSetRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCart"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`sign_in_required`: the store shows prices to signed-in customers only"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`, or `variant_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`insufficient_stock` (`details` has `available`, `max_shippable` and `limiting_sku`), `quote_items_locked`: a quote whose seller fixed its shipping, or `not_available_to_group`: the customer's group does not buy this product"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`gift_card_cart_mixed`: a cart holds gift cards or goods, never both"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Set a cart line","tags":["Cart"]}},"/storefront/carts/{cart_id}/payments":{"post":{"description":"Turns the cart into an order (once; later calls reuse it) and starts a\npayment with the store's gateway: a PIX charge (answered with the QR code\nin `next_action`) or a card payment: with a Mercado Pago card token, or,\nwhen the store's card gateway is Asaas, a charge whose page the shopper\nis sent to (`next_action.type = \"redirect\"`; the same page is answered\nagain until it is paid or the installments change). The\namount is the order's price for the method (the store's PIX or card\ndiscount included) and the order records it; card installments are\nwhat the store allows for that price (`getStorefrontInstallments`), and\npast its interest-free ones the store's interest is charged and recorded\non the order apart. A signed-in shopper may pay with a saved card or keep\nthis one (stores that offer it). An\norder has one live charge: a PIX still payable is answered again, and\npaying by card cancels it first; an order already paid answers its\napproved payment. A card approved on the spot marks the order paid.","operationId":"createStorefrontPaymentIntent","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCreateIntentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontPaymentIntent"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An empty cart (`cart_empty`), a missing card token or payer data, or `installments_below_minimum` (more installments than the price allows; `max_installments` says how many)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`insufficient_stock` for a line, `order_not_payable` (the order was cancelled or closed), `payment_in_progress` (a card payment is still processing) or `pix_pending` (a PIX could not be cancelled to pay by card)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`document_required` (Pix, a boleto, and a card paid on Asaas's page, need the payer's CPF/CNPJ, sent here or saved with the cart's contact), `invalid_document` (fails the check digits, e.g. 999.999.999-99), `freight_selection_required`, `address_required` (the cart contact has no billing address: street, CEP, city, state; pickup included), `saved_card_unavailable` (not the signed-in customer's card, or not of the store's card gateway), or the gateway refused the payment"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Pay for the cart","tags":["Checkout"]}},"/storefront/carts/{cart_id}/payments/{intent_id}":{"get":{"description":"Poll this while a PIX charge is pending: `status` turns `approved` once\npaid. The intent must belong to the cart.","operationId":"getStorefrontPaymentIntent","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}},{"description":"Payment intent id","in":"path","name":"intent_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontPaymentIntent"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`, or no such payment in this cart"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a payment attempt","tags":["Checkout"]}},"/storefront/carts/{cart_id}/referral":{"delete":{"operationId":"removeStorefrontCartReferral","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartReferral"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Take the referral code off the cart","tags":["Cart"]},"get":{"operationId":"getStorefrontCartReferral","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartReferral"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"The cart's referral","tags":["Cart"]},"put":{"description":"When the order is paid and it is the shopper's first in the store, both\nget store credit once the order has stood for the store's waiting days.\nWhether it counts (a first order, not their own code) is decided then.\nReplaces a code the cart had. Codes are looked up at a limited rate.","operationId":"setStorefrontCartReferral","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCartReferral"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartReferral"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`, or `referral_not_found`: no customer of this store has the code"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`referrals_off`: the store does not run referrals; `own_referral_code`: the signed-in customer's own code"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: too many code lookups from this address","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Put a friend's referral code on the cart","tags":["Cart"]}},"/storefront/carts/{cart_id}/scheduled-date":{"put":{"description":"Asks for the order to be dispatched (or be ready for pickup) on a given\nday rather than as soon as possible. Only when the cart's `scheduling`\nis not null (the store takes scheduled orders): the day must fall inside\nit (`earliest_on` to `latest_on`, both included). `null` clears it.\nCheckout carries the day to the order. Answers with the whole cart.","operationId":"setStorefrontCartScheduledDate","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCartScheduledDateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCart"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`scheduling_unavailable`: the store does not take scheduled orders"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`scheduled_on_too_soon` (in the past or inside the store's lead time) or `scheduled_on_too_late` (more than a year ahead); `details` has `earliest_on` and `latest_on`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Schedule the order","tags":["Cart"]}},"/storefront/carts/{cart_id}/shipping-option":{"put":{"description":"Applies one option of the cart's last shipping quote; its price becomes\nthe cart's `shipping_cents`. An expired quote must be quoted again. Answers\nwith the whole cart.","operationId":"selectStorefrontCartShippingOption","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCartShippingOptionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCart"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_request`: no quote, an unknown option or an expired quote"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`quote_freight_locked`: the cart is a quote whose seller fixed its shipping"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Choose a shipping option","tags":["Cart"]}},"/storefront/carts/{cart_id}/shipping-quotes":{"post":{"description":"Asks every shipping module of the store (carriers and local delivery\nzones) for options to the postal code and saves the quote on the cart.\nThe answer is the whole cart, whose `shipping_options` are the options and\n`destination_postal_code` the CEP they were quoted for; choose one with\n`PUT /storefront/carts/{cart_id}/shipping-option`. A quote stays valid for\na limited time; quote again once it expired.","operationId":"quoteStorefrontCartShipping","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCartShippingQuoteRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCart"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_request`: an invalid CEP or a cart that cannot be quoted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`quote_address_locked`: the cart is a quote whose seller fixed its delivery address"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`shipping_not_configured`: the store has no shipping set up"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`shipping_unavailable`: the carriers did not answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Quote shipping for the cart","tags":["Cart"]}},"/storefront/carts/{cart_id}/whatsapp":{"put":{"description":"The cart drawer's step before checkout: a phone and, when the shopper\ngives it, consent to get this cart's reminders and the store's offers on\nWhatsApp.\nSaves only those on the cart's contact draft (anything typed at checkout\nstays), with where and how it was ticked as the consent's proof; the\nconsent is recorded on the customer when the cart is abandoned or the\norder is placed. Like the checkout contact, the phone is untrusted: it is\nnot matched against the store's customers here. On `current`, starts a\ncart when the shopper has none. Answers with the whole cart.","operationId":"saveStorefrontCartWhatsapp","parameters":[{"description":"The cart's id from `POST /storefront/carts`, or `current` for the cart the `cart_id` cookie names (themes)","in":"path","name":"cart_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCartWhatsappRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCart"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_phone`: not a phone number (the message says why)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Save the cart's WhatsApp","tags":["Cart"]}},"/storefront/categories":{"get":{"description":"The store's active categories, in the order the merchant arranged them\n(then by name). Hierarchy is flat: `parent_slug` names the parent.\n`product_count` counts the visible products filed directly in the\ncategory. Pass a category's `slug` as `category` to `GET /storefront/products`.","operationId":"listStorefrontCategories","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Category"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List categories","tags":["Catalog"]}},"/storefront/cms/collections/{collection_slug}/documents":{"get":{"description":"The collection's active documents in the order the store gave them, those\nscheduled for later and those past their end left out.","operationId":"listStorefrontCmsDocuments","parameters":[{"description":"The collection's slug","in":"path","name":"collection_slug","required":true,"schema":{"type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_StorefrontCmsDocument"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cms_collection_not_found`: no active collection with this slug"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List a CMS collection's documents","tags":["Content"]}},"/storefront/cms/collections/{collection_slug}/documents/{document}":{"get":{"description":"One document of a collection, by its slug or its id: a blog post at\n`/blog/{slug}` is `cms/collections/{collection}/documents/{slug}`.","operationId":"getStorefrontCmsDocument","parameters":[{"description":"The collection's slug","in":"path","name":"collection_slug","required":true,"schema":{"type":"string"}},{"description":"The document's slug or id","in":"path","name":"document","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCmsDocument"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cms_collection_not_found` or `cms_document_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a CMS document","tags":["Content"]}},"/storefront/collections":{"get":{"description":"The store's curated collections that are active and published to the\nkey's sales channel, by name. Pass a collection's `handle` as\n`collection` to `GET /storefront/products`. A collection has no picture\nof its own: `image` is its first product's main image.","operationId":"listStorefrontCollections","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Collection"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List collections","tags":["Catalog"]}},"/storefront/customers":{"post":{"description":"Starts a registration: e-mails the shopper a link, valid 15 minutes,\nthat finishes it (`POST /storefront/customers/verify` with the token and\na password). Nothing is signed in and no password is stored until then, so\nnobody can take over an e-mail they do not control; a customer the store\nalready knows from an order or import (no password yet) is adopted at\nthat point, keeping its order history. The answer is the same whether or\nnot the e-mail already has an account.","operationId":"registerStorefrontCustomer","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerRegisterRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontRegistrationPending"}}},"description":"Verification e-mail sent (if the address can register)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: invalid e-mail or phone, or a password under 8 characters (`details.fields`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: too many attempts from this address or for this e-mail","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a customer account","tags":["Account"]}},"/storefront/customers/me":{"get":{"description":"The profile of the customer the bearer token (or session cookie) belongs\nto, with their default delivery address and every saved address.","operationId":"getStorefrontCustomer","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerProfile"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`: no token, an expired one, or one issued by another store"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Get the signed-in customer","tags":["Account"]},"patch":{"description":"Name, mobile, CPF/CNPJ, birthday, the default delivery address and\nwhether they want offers by e-mail or WhatsApp (recorded as their\nconsent, with this request's IP and browser); a field left out stays as\nit is. Every change is kept in the store's CRM\n(the customer's timeline shows what they changed). Orders already placed\nkeep the address they were placed with. Answers the whole profile.","operationId":"updateStorefrontCustomer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerProfile"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: every invalid field is listed in `details.fields` (`phone`, `document`, `date_of_birth`, `full_name`, `address.*`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Update the signed-in customer","tags":["Account"]}},"/storefront/customers/me/addresses":{"get":{"description":"Every delivery address the signed-in customer saved, the default first\n(at most 10).","operationId":"listStorefrontCustomerAddresses","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_StorefrontCustomerSavedAddress"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"List saved addresses","tags":["Account"]},"post":{"description":"Adds one of the signed-in customer's addresses (their first one becomes\nthe default; `is_default` makes a later one the default). Answers the\nsaved address.","operationId":"createStorefrontCustomerAddress","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerAddressInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerSavedAddress"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` (`details.fields.address.*`), or `too_many_addresses`: the customer already keeps 10"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Save a new address","tags":["Account"]}},"/storefront/customers/me/addresses/{address_id}":{"delete":{"description":"Removing the default makes the most recent remaining one the default.","operationId":"deleteStorefrontCustomerAddress","parameters":[{"description":"Address id","in":"path","name":"address_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Removed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`address_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Remove a saved address","tags":["Account"]},"patch":{"description":"Replaces one of the signed-in customer's addresses, or makes it the\ndefault (`is_default`). Answers the saved address.","operationId":"updateStorefrontCustomerAddress","parameters":[{"description":"Address id","in":"path","name":"address_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerAddressInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerSavedAddress"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`address_not_found`: no such address among the customer's"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` (`details.fields.address.*`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Change a saved address","tags":["Account"]}},"/storefront/customers/me/bookings":{"get":{"description":"Upcoming ones soonest first, then past ones newest first (up to 100). Each\ncarries what the booking's private link shows (`can_change` says whether it\ncan still be cancelled) and its `id`.","operationId":"listStorefrontMyBookings","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_MyBooking"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"List the signed-in customer's bookings","tags":["Account"]}},"/storefront/customers/me/bookings/{id}/cancel":{"post":{"description":"Until the service's cutoff before it starts. Answers the booking. 404\n`booking_not_found` for one that is not theirs; 409 `cancel_window_closed`\nor `invalid_state`.","operationId":"cancelStorefrontMyBooking","parameters":[{"description":"Booking id","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelMyBooking"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyBooking"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`booking_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cancel_window_closed` or `invalid_state`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Cancel one of the customer's bookings","tags":["Account"]}},"/storefront/customers/me/cards":{"get":{"description":"The cards kept at checkout, the last used first: brand, last four\ndigits, expiry, and whether the store's card gateway can charge it now\n(`usable`; a Mercado Pago card also takes its CVV again, `needs_cvv`).\nEmpty when the store does not offer saved cards and none were kept.","operationId":"listStorefrontSavedCards","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_StorefrontSavedCard"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"List the signed-in customer's saved cards","tags":["Account"]}},"/storefront/customers/me/cards/{card_id}":{"delete":{"description":"Forgets the card here and removes it at Mercado Pago (Asaas has no way\nto withdraw a card token: it is forgotten here and never charged again).","operationId":"deleteStorefrontSavedCard","parameters":[{"description":"The saved card's id","in":"path","name":"card_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Removed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such card among the customer's"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Remove a saved card","tags":["Account"]}},"/storefront/customers/me/credit":{"get":{"description":"The balance of their wallet (credit from returns and goodwill) and its\n50 most recent entries, newest first. Gift cards are not listed: they\nbelong to whoever holds the code and are added to a cart at checkout\n(`POST /storefront/carts/{cart_id}/credit/gift-cards`).","operationId":"getStorefrontCustomerCredit","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalCredit"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"The customer's store credit","tags":["Account"]}},"/storefront/customers/me/data":{"get":{"description":"Everything the store holds about the signed-in customer, as a JSON file:\nprofile, addresses, consent history, orders, conversations, e-mails and\nvisits. Recorded as an answered access request.","operationId":"downloadStorefrontCustomerData","responses":{"200":{"content":{"application/json":{}},"description":"The data, as a JSON file"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Download my data (LGPD)","tags":["Account"]}},"/storefront/customers/me/loyalty":{"get":{"description":"Their points (usable now and still waiting), what the usable ones buy in\nstore credit, the store's rules and tiers, the 50 most recent entries, their\ncashback (waiting and released), their wallet's history and what in it\nexpires, their tier, its history and what a purchase earns them now, and,\nwhen the store has referrals on, their referral code (made on the first\ncall).","operationId":"getStorefrontCustomerLoyalty","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalLoyalty"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"The customer's points, cashback, wallet, tier and referral code","tags":["Account"]}},"/storefront/customers/me/loyalty/redeem":{"post":{"description":"The credit goes to the customer's wallet at once, to spend at checkout\nsigned in. Answers the customer's loyalty.","operationId":"redeemStorefrontCustomerPoints","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemMyPoints"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalLoyalty"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`loyalty_off`, `invalid_points` (`details.step_points`) or `insufficient_points` (`details.available_points`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Turn points into store credit","tags":["Account"]}},"/storefront/customers/me/orders":{"get":{"description":"Placed orders (drafts and test orders are left out), newest first. Use\n`GET /storefront/customers/me/orders/{number}` for one order's detail.","operationId":"listStorefrontCustomerOrders","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_StorefrontCustomerOrder"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"List the signed-in customer's orders","tags":["Account"]}},"/storefront/customers/me/orders/{number}":{"get":{"description":"Items with where each stands (received, in production, ready, shipped,\ndelivered), shipments with tracking, the NF-e (DANFE link) and its\ncartas de correção.","operationId":"getStorefrontCustomerOrder","parameters":[{"description":"Order number","in":"path","name":"number","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerOrderDetail"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_not_found`: no such order among the customer's"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"One of the signed-in customer's orders","tags":["Account"]}},"/storefront/customers/me/orders/{number}/corrections/{sequence}/pdf":{"get":{"description":"The printable CC-e of a correction registered for the order's invoice.","operationId":"getStorefrontCustomerOrderCorrection","parameters":[{"description":"Order number","in":"path","name":"number","required":true,"schema":{"type":"string"}},{"description":"CC-e sequence","in":"path","name":"sequence","required":true,"schema":{"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{}},"description":"PDF"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_not_found` or `correction_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"A carta de correção of the customer's order (PDF)","tags":["Account"]}},"/storefront/customers/me/orders/{number}/danfe":{"get":{"description":"The printable NF-e of an order that has an authorized (or cancelled)\ninvoice.","operationId":"getStorefrontCustomerOrderDanfe","parameters":[{"description":"Order number","in":"path","name":"number","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/pdf":{}},"description":"PDF"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_not_found`, or `invoice_not_found`: the order has no invoice to print yet"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"The DANFE of the customer's order (PDF)","tags":["Account"]}},"/storefront/customers/me/orders/{number}/downloads":{"get":{"description":"What they bought that is delivered online: a title, a link and/or\ninstructions for each digital product. Empty until the order is paid, and\nfor an order with nothing digital.","operationId":"getStorefrontOrderDownloads","parameters":[{"description":"The order number","in":"path","name":"number","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrderDigitalItem"},"type":"array"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such order among the customer's"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"The digital items of one of the signed-in customer's orders","tags":["Account"]}},"/storefront/customers/me/orders/{number}/returnable":{"get":{"description":"Per line, how many units are still returnable, and whether they can ask\nnow (the store takes returns, the order is paid and delivered, and the\nwindow after delivery is open).","operationId":"getStorefrontOrderReturnable","parameters":[{"description":"Order number","in":"path","name":"number","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalReturnable"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"What the customer can return from an order","tags":["Account"]}},"/storefront/customers/me/orders/{number}/returns":{"post":{"description":"Opens a return as `requested`; the store approves or rejects it. Refused\nwhen the store does not take returns, the order is not paid or delivered\nyet, the window after delivery has closed, or a quantity is more than is\nleft to return. With `resolution: exchange` the customer picks other\nvariants of the same products instead of a refund.","operationId":"createStorefrontReturn","parameters":[{"description":"Order number","in":"path","name":"number","required":true,"schema":{"type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalReturnRequestBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalReturn"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`returns_disabled`, `order_not_paid`, `order_not_delivered`, `return_window_closed`, `nothing_to_return`, `invalid_reason`, `no_items`, `invalid_quantity`, `duplicate_item`, `item_not_in_order`, `quantity_exceeds_returnable`, `invalid_resolution`, `exchanges_disabled`, `no_exchange_items`, `duplicate_exchange_item`, `exchange_variant_not_found`, `exchange_variant_unavailable`, `exchange_other_product`, `exchange_exceeds_returned`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Ask to return or exchange items from an order","tags":["Account"]}},"/storefront/customers/me/privacy-requests":{"get":{"description":"The customer's most recent requests (up to 20), newest first.","operationId":"listStorefrontPrivacyRequests","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_PrivacyRequest"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"My requests about my data","tags":["Account"]},"post":{"description":"Asks for the customer's data to be deleted or corrected, or anything\nelse about it. The store's team is told and answers within 15 days.","operationId":"createStorefrontPrivacyRequest","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontPrivacyRequestCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivacyRequest"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`privacy_request_open`: the customer already has an open request of that kind"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Ask the store about my data (LGPD)","tags":["Account"]}},"/storefront/customers/me/products":{"get":{"description":"One row per item of their paid orders (drafts, unpaid, cancelled and\nrefunded orders are left out), newest orders first, with where each stands.\nCovers the 30 most recent orders.","operationId":"listStorefrontCustomerProducts","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_StorefrontCustomerProduct"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"What the signed-in customer bought","tags":["Account"]}},"/storefront/customers/me/returns":{"get":{"description":"Their 200 most recent returns, newest first.","operationId":"listStorefrontReturns","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_PortalReturn"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"List the signed-in customer's returns","tags":["Account"]}},"/storefront/customers/me/returns/{number}":{"get":{"operationId":"getStorefrontReturn","parameters":[{"description":"Return number (per store: 1, 2, 3...)","in":"path","name":"number","required":true,"schema":{"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalReturn"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such return among the customer's"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"One of the signed-in customer's returns","tags":["Account"]}},"/storefront/customers/me/returns/{number}/cancel":{"post":{"description":"Only while the store has not received the goods (`requested` or `approved`).\nAnswers the cancelled return.","operationId":"cancelStorefrontReturn","parameters":[{"description":"Return number (per store: 1, 2, 3...)","in":"path","name":"number","required":true,"schema":{"format":"int32","type":"integer"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalReturn"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such return among the customer's"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state`: the return is already received, refunded or closed; `return_note_issued`: the store already issued its NF-e de devolução"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Cancel a return","tags":["Account"]}},"/storefront/customers/me/subscriptions":{"get":{"description":"Active ones first, soonest next order first; cancelled ones last.","operationId":"listStorefrontSubscriptions","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_PortalSubscription"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"List the signed-in customer's subscriptions","tags":["Account"]},"post":{"description":"Starts a subscription of a product that offers them, at one of its\nintervals (`subscription_options` on the product). The first order is\nplaced within minutes and its Pix e-mailed; each later one repeats the\ndelivery of the customer's latest paid order. 422 `not_subscribable`,\n`invalid_interval_option` or `needs_first_order` (a physical product needs\nan earlier purchase to know where to send it); 409 `already_subscribed`,\n`out_of_stock` or `too_many_subscriptions`.","operationId":"startStorefrontSubscription","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartMySubscription"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSubscription"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`variant_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`already_subscribed`, `out_of_stock` or `too_many_subscriptions`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_subscribable`, `invalid_interval_option` or `needs_first_order`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Subscribe to a product","tags":["Account"]}},"/storefront/customers/me/subscriptions/{id}/cancel":{"post":{"description":"Final: no further orders are placed. Answers the subscription.","operationId":"cancelStorefrontSubscription","parameters":[{"description":"Subscription id","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSubscription"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such subscription among the customer's"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state`: already cancelled"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Cancel a subscription","tags":["Account"]}},"/storefront/customers/me/subscriptions/{id}/pause":{"post":{"description":"No orders are placed until it is resumed. Answers the subscription.","operationId":"pauseStorefrontSubscription","parameters":[{"description":"Subscription id","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSubscription"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such subscription among the customer's"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state`: not active"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Pause a subscription","tags":["Account"]}},"/storefront/customers/me/subscriptions/{id}/resume":{"post":{"description":"Only one the customer paused: after failed cycles the store lifts the pause. Answers the subscription.","operationId":"resumeStorefrontSubscription","parameters":[{"description":"Subscription id","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSubscription"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such subscription among the customer's"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state`: not paused; `needs_store`: the store paused it"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Resume a subscription","tags":["Account"]}},"/storefront/customers/me/subscriptions/{id}/skip":{"post":{"description":"The next order is not placed; the one after it is. Answers the subscription.","operationId":"skipStorefrontSubscription","parameters":[{"description":"Subscription id","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSubscription"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such subscription among the customer's"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state`: not active"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Skip the next order","tags":["Account"]}},"/storefront/customers/verify":{"post":{"description":"Sets the password with the token from the verification e-mail and signs\nthe customer in. The token is single use and expires 15 minutes after it\nwas sent, and only works in the store that sent it.","operationId":"verifyStorefrontCustomer","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerVerifyRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCustomerSession"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_verification_token`: invalid, expired or already used link"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a password under 8 characters (`details.fields`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: too many verification attempts","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Finish a customer registration","tags":["Account"]}},"/storefront/forms/{form_slug}":{"get":{"description":"The form's fields and labels, to render it, and where to submit it. Only\nactive forms are served.","operationId":"getStorefrontForm","parameters":[{"description":"Form slug","in":"path","name":"form_slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontForm"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`form_not_found`: no active form with this slug"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a form","tags":["Forms"]}},"/storefront/forms/{form_slug}/submissions":{"post":{"description":"Field values by key (JSON). Values are validated by type and stored\ncanonical; the matching customer is completed (or created), consents are\nrecorded and the store's team is told by e-mail. 422 `validation_failed`\nlists the fields to fix in `details.fields` (message) and `details.codes`\n(code). Limited to a few submissions per address and period.","operationId":"submitStorefrontForm","parameters":[{"description":"Form slug","in":"path","name":"form_slug","required":true,"schema":{"type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontFormSubmission"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontFormSubmitted"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`turnstile_failed`: the bot check was missing or refused"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`form_not_found`: no active form with this slug"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: `details.fields` and `details.codes` name the fields to fix"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: too many submissions from this address","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Send a form","tags":["Forms"]}},"/storefront/installments":{"get":{"description":"Every count the shopper may pick for the amount, with each installment,\nthe total charged and whether it is interest-free: the store's\ninterest-free installments, then, past them, the store's own monthly\nrate (Price table, charged in the amount) or the gateway's rates (added\nby the gateway). The same numbers the charge uses. Call it with the\ncard's first 6 digits once typed: with Mercado Pago the plans are then\nthat card's (an issuer may add interest the store does not absorb).","operationId":"getStorefrontInstallments","parameters":[{"description":"The card number's first 6 digits (more are ignored). Without it, the\nstore's own plans; with it and Mercado Pago, the plans for that card.","in":"query","name":"bin","required":false,"schema":{"type":"string"}},{"description":"What the card pays, in cents.","in":"query","name":"amount_cents","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontInstallments"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`error: invalid_bin_or_amount`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get card installment plans","tags":["Checkout"]}},"/storefront/locations":{"get":{"description":"The store's active locations, by the order the merchant arranged them.\nWithout `pickup` it is the store locator: every location marked visible\nthere. With `pickup=true` it is the places an order can be picked up (what\n`PUT /storefront/carts/{cart_id}/fulfillment` accepts).","operationId":"listStorefrontLocations","parameters":[{"description":"`true`: only locations where orders can be picked up (the cart's\npickup picker). `false`: only the locator's locations that do not\noffer pickup. Omit for every location shown in the store locator.","in":"query","name":"pickup","required":false,"schema":{"type":"boolean"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_StorefrontLocation"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List locations","tags":["Locations"]}},"/storefront/loyalty/rates":{"get":{"description":"The program's rates for the signed-in customer's tier, or for a visitor\n(the lowest tier when it needs no spend): points per R$ 1,00 and the\nmultiplier, the cashback percent, and the days before it counts. A\nproduct earns `price × cashback_bps / 10000` cents of cashback and\n`price / 100 × points_per_currency_unit × multiplier_bps / 10000` points,\nrounded down, on what is paid with money for goods.","operationId":"getStorefrontLoyaltyRates","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EarnRates"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"What a purchase earns","tags":["Account"]}},"/storefront/menus":{"get":{"description":"The site's menus, by handle, with their links resolved to the addresses\nthe store's pages live at.","operationId":"listStorefrontMenus","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_StorefrontMenu"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List menus","tags":["Content"]}},"/storefront/menus/{handle}":{"get":{"operationId":"getStorefrontMenu","parameters":[{"description":"The menu's handle: `main`, `footer`...","in":"path","name":"handle","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontMenu"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`menu_not_found`: the site has no menu with this handle"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a menu","tags":["Content"]}},"/storefront/orders/{order_id}/boleto":{"get":{"description":"The boleto of an order waiting for one, to print or save: the PDF, for a\ngateway that serves it only to the store's account (Banco Inter), or a\nredirect to the gateway's own page (Asaas, Mercado Pago). The link the\norder page and the e-mails give already carries the order's token.","operationId":"getStorefrontOrderBoleto","parameters":[{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The order's access token, from the link the store sent (the order\npage passes it on in `order.pay_url`). Also accepted as the\n`x-order-token` header.","in":"query","name":"t","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"items":{"format":"int32","minimum":0,"type":"integer"},"type":"array"}}},"description":"The boleto as a PDF"},"302":{"description":"The gateway's page for the boleto"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_access_required`: neither the order's cart nor its token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_not_found`, or `boleto_not_found` (no boleto waiting to be paid)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`provider_error`: the gateway did not hand the PDF over"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"The order's boleto","tags":["Checkout"]}},"/storefront/orders/{order_id}/payment":{"get":{"description":"Where the order's payment stands, for an order page to show and to poll\nwhile a PIX waits: `state` is `paid`, `waiting` (with the PIX code, or the\ngateway's page for a card), `processing`, `failed` (with the reason),\n`unpaid`, `cancelled`, `refunded` or `partially_refunded`. The order's id\nis the credential, as on the order page.","operationId":"getStorefrontOrderPayment","parameters":[{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontOrderPayment"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"The order's payment","tags":["Checkout"]}},"/storefront/orders/{order_id}/payments":{"post":{"description":"A new payment for an order that waits for one: after a refused card, a\nPIX that lapsed, or to switch between PIX, card and boleto. Same request and\nanswer as the cart's payment (`createStorefrontPaymentIntent`) and the\nsame rules (`checkout::charge`): a PIX still payable is answered again,\npaying by card cancels it first, and an order already paid answers its\npayment. The payer's CPF/CNPJ, e-mail and name default to the ones given\nat checkout.\n\nA new charge needs the browser that holds the order's cart (the\n`cart_id` cookie) or the order's token (`t`, from the link the store\nsent, passed on by the order page in `order.pay_url`). Without either,\nonly an existing charge is answered again (a PIX code still payable, the\npayment that went through), and nothing about the payer is read or kept.","operationId":"payStorefrontOrder","parameters":[{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The order's access token, from the link the store sent (the order\npage passes it on in `order.pay_url`). Also accepted as the\n`x-order-token` header.","in":"query","name":"t","required":false,"schema":{"type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontCreateIntentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontPaymentIntent"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`card_token_required`, or `installments_below_minimum` (`max_installments` says how many)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_access_required`: a new charge without the order's cart or token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_not_payable` (cancelled, refunded or closed), `payment_in_progress` or `pix_pending`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`document_required`, `invalid_document`, `payment_method_unavailable` (the store takes no such method), or `payment_failed` (the gateway did not take the payment)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Pay an order","tags":["Checkout"]}},"/storefront/pages":{"get":{"description":"The pages with a body at their address, by title: the store's published\ncontent pages, the live theme's page files, and the policy pages the\nplatform writes from the store's company details (privacy, returns,\nterms) where the store has none of its own. Pages built in the site\neditor are made of sections and are not listed.","operationId":"listStorefrontContentPages","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_StorefrontContentPage"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List content pages","tags":["Content"]}},"/storefront/pages/{handle}":{"get":{"description":"The page with a body at that address, resolved as the store resolves it:\na published page, else a theme page file, else the policy page the\nplatform writes there.","operationId":"getStorefrontContentPage","parameters":[{"description":"The page's address segment","in":"path","name":"handle","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontContentPage"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`page_not_found`: no published page at this address"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a content page","tags":["Content"]}},"/storefront/payment-methods":{"get":{"description":"What the store accepts at checkout (`pix`, `card`, `boleto`) and which\ngateway takes each, so a custom checkout shows only what works. A boleto\nis listed when the store switched it on for a connected gateway; it is\npaid by its due date and confirmed one to three business days after it\nis paid. `card_public_key` is the Mercado\nPago public key the card form tokenizes with (null when the store's card\ngateway does not tokenize in the browser, for example Asaas).","operationId":"listStorefrontPaymentMethods","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontPaymentMethods"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List payment methods","tags":["Checkout"]}},"/storefront/popups":{"get":{"description":"The store's active popups that show on this page type, newest first.\nThe page decides which one opens (its own timing and frequency rules).","operationId":"listStorefrontPopups","parameters":[{"description":"The page type (`index`, `product`, `collection`, `cart`...); every\nactive popup when omitted.","in":"query","name":"page","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/StorefrontPopup"},"type":"array"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Popups for a page","tags":["Popups"]}},"/storefront/popups/{popup_id}/signups":{"post":{"description":"Takes the e-mail and/or WhatsApp number the popup asks for, with the\nticked consent box; completes the customer, records the consent, and\nanswers the visitor's single-use coupon (also sent by e-mail and, when\nset up, WhatsApp). The same person signing up again gets the same coupon.\n422 `validation_failed` names the fields to fix in `details.fields`; 429\n`rate_limited` when an address or a contact asked too often.","operationId":"signUpStorefrontPopup","parameters":[{"description":"Popup id","in":"path","name":"popup_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontPopupSignup"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontPopupSignedUp"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`turnstile_failed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`popup_not_found`: no active popup with this id"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Sign up through a popup","tags":["Popups"]}},"/storefront/popups/{popup_id}/views":{"post":{"description":"The page calls it when the popup opens. Always 204; views past a per-IP\nlimit are not counted.","operationId":"countStorefrontPopupView","parameters":[{"description":"Popup id","in":"path","name":"popup_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"204":{"description":"No Content"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Count a popup's view","tags":["Popups"]}},"/storefront/products":{"get":{"description":"The store's catalog: active products published to the key's sales\nchannel. Filter by `search`, `category` (slug), `collection` (handle),\nprice (`min_price_cents`, `max_price_cents`, on the lowest price the\nshopper pays) and `in_stock`; order with `sort`. The order is always\ntotal and stable. `sort=newest` (the default without `search`) pages with\na keyset cursor, so products added meanwhile never shift a page; the\nother sorts page by position. `limit` is 1 to 200 (default 50). The list\ncarries the same fields as the detail, minus the long descriptions.\n\nPrices are the shopper's: signed in (session cookie or customer token), a\nreseller gets their price list's prices and quantity tiers; where the\nstore shows prices to signed-in customers only, a visitor gets none\n(`prices_hidden`).","operationId":"listStorefrontProducts","parameters":[{"description":"Free-text search over title, description and slug (accent-insensitive\nand typo tolerant).","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Only products in the category with this slug. An unknown or inactive\ncategory is a 404 `category_not_found`.","in":"query","name":"category","required":false,"schema":{"type":"string"}},{"description":"Only products in the collection with this handle. An unknown or\nunpublished collection is a 404 `collection_not_found`.","in":"query","name":"collection","required":false,"schema":{"type":"string"}},{"description":"Order of the list. Defaults to `relevance` when `search` is sent and\nto `newest` otherwise.","in":"query","name":"sort","required":false,"schema":{"description":"Sort order of the product list.","enum":["newest","price_asc","price_desc","relevance","title"],"type":"string"}},{"description":"Only products whose lowest price is at least this many cents.","in":"query","name":"min_price_cents","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"Only products whose lowest price is at most this many cents.","in":"query","name":"max_price_cents","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"`true`: only products with a variant that can be bought now (stock on\nhand, or made to order). Products that are only available through the\nparts of a kit may be missing from this filter.","in":"query","name":"in_stock","required":false,"schema":{"type":"boolean"}},{"description":"Only products of these brands, separated by commas (`Bododo,Nuvem`),\ncompared without case or accents.","in":"query","name":"brand","required":false,"schema":{"type":"string"}},{"description":"Only products with a variant that has these option values: `name:value`\npairs separated by commas (`Cor:Azul,Cor:Verde,Tamanho:M`). Several\nvalues of one option match any of them; different options must match on\nthe same variant (and with `in_stock`, that variant must be the one in\nstock). The option is named by its name or its `key`\n(`GET /storefront/products/facets`); values compare without case or\naccents.","in":"query","name":"options","required":false,"schema":{"type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Product"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`category_not_found` or `collection_not_found`: the category or collection filter names none that is visible"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`min_price_cents` is above `max_price_cents`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List products","tags":["Catalog"]}},"/storefront/products/facets":{"get":{"description":"The facets of a product list: for the same filters as\n`GET /storefront/products`, every brand and option value (with colours)\nof the listed products and how many products choosing it would list,\ncounted with the other filters kept (a value of the same option adds to\nthe list instead of narrowing it), plus the products in stock and the\nprice range. Products without an active variant are not counted.","operationId":"listStorefrontProductFacets","parameters":[{"description":"Free-text search over title, description and slug (accent-insensitive\nand typo tolerant).","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Only products in the category with this slug. An unknown or inactive\ncategory is a 404 `category_not_found`.","in":"query","name":"category","required":false,"schema":{"type":"string"}},{"description":"Only products in the collection with this handle. An unknown or\nunpublished collection is a 404 `collection_not_found`.","in":"query","name":"collection","required":false,"schema":{"type":"string"}},{"description":"Order of the list. Defaults to `relevance` when `search` is sent and\nto `newest` otherwise.","in":"query","name":"sort","required":false,"schema":{"description":"Sort order of the product list.","enum":["newest","price_asc","price_desc","relevance","title"],"type":"string"}},{"description":"Only products whose lowest price is at least this many cents.","in":"query","name":"min_price_cents","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"Only products whose lowest price is at most this many cents.","in":"query","name":"max_price_cents","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"`true`: only products with a variant that can be bought now (stock on\nhand, or made to order). Products that are only available through the\nparts of a kit may be missing from this filter.","in":"query","name":"in_stock","required":false,"schema":{"type":"boolean"}},{"description":"Only products of these brands, separated by commas (`Bododo,Nuvem`),\ncompared without case or accents.","in":"query","name":"brand","required":false,"schema":{"type":"string"}},{"description":"Only products with a variant that has these option values: `name:value`\npairs separated by commas (`Cor:Azul,Cor:Verde,Tamanho:M`). Several\nvalues of one option match any of them; different options must match on\nthe same variant (and with `in_stock`, that variant must be the one in\nstock). The option is named by its name or its `key`\n(`GET /storefront/products/facets`); values compare without case or\naccents.","in":"query","name":"options","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductFacets"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`category_not_found` or `collection_not_found`: the category or collection filter names none that is visible"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`min_price_cents` is above `max_price_cents`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Count products by filter","tags":["Catalog"]}},"/storefront/products/{product_ref}":{"get":{"description":"One product with its variants, images, options and categories, including\nthe long descriptions. `product_ref` is the product's id or its slug.\nPrices are the shopper's, as in the list.","operationId":"getStorefrontProduct","parameters":[{"description":"The product's id (UUID) or slug","in":"path","name":"product_ref","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`: no active product with this id or slug on the sales channel"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a product","tags":["Catalog"]}},"/storefront/products/{product_ref}/reviews":{"get":{"description":"Approved reviews, newest first, with the rating summary (average and\ncount per star). `product_ref` is the product's id or slug. Pages with a\nkeyset cursor, so new reviews never shift a page; `limit` is 1 to 200\n(default 50).","operationId":"listStorefrontProductReviews","parameters":[{"description":"The product's id (UUID) or slug","in":"path","name":"product_ref","required":true,"schema":{"type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductReviewList"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`: no active product with this id or slug"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List a product's reviews","tags":["Engagement"]},"post":{"description":"Stored as `pending` when the store moderates reviews, `approved`\notherwise (see `status` in the response); a pending review is not listed\nuntil the merchant approves it. Marked as a verified purchase when the\ne-mail bought the product in this store. `product_ref` is the product's\nid or slug.","operationId":"createStorefrontProductReview","parameters":[{"description":"The product's id (UUID) or slug","in":"path","name":"product_ref","required":true,"schema":{"type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewSubmitRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmittedReview"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`reviews_disabled`: the store does not take reviews"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`: no active product with this id or slug"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid author_name, author_email, body or rating (`validation_failed`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Submit a product review","tags":["Engagement"]}},"/storefront/products/{product_ref}/subscriptions":{"post":{"description":"\"Let me know\": the shopper gets an e-mail when the product is back in\nstock or its price drops (through the store's journey for\n`inventory.back_in_stock` / `products.price_dropped`). Creates the contact\nif the e-mail is new, with marketing consent only when\n`marketing_opt_in` is true. Signing up again for the same product and\nkind reactivates the same subscription (same `id`). `product_ref` is the\nproduct's id or slug.","operationId":"createStorefrontProductSubscription","parameters":[{"description":"The product's id (UUID) or slug","in":"path","name":"product_ref","required":true,"schema":{"type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSubscribeRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontProductSubscription"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`: no active product with this id or slug"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: not an e-mail address, or `variant_id` is not a variant of the product"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Subscribe to a product","tags":["Engagement"]}},"/storefront/reseller-applications":{"post":{"description":"Sends the store a business's request to buy as a reseller: company (razão social, CNPJ, state registration or\nexempt), contact, address and how it sells. The store's team is told and answers by e-mail. A signed-in shopper's\nrequest is tied to their account.","operationId":"createStorefrontResellerApplication","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontResellerApplicationCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationReceived"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`applications_closed`: the store takes no requests, or `turnstile_failed`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`application_pending`: the company already has a request waiting"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: `details.fields` names the fields to fix"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Ask to be a reseller","tags":["Account"]}},"/storefront/reseller-applications/cnpj/{cnpj}":{"get":{"description":"Receita Federal's open data for the sign-up form to fill in: legal name, trade name, address, and whether the\ncompany is active. No state registration (it is not in the open data). Only while the store takes reseller\nrequests.","operationId":"lookupStorefrontCnpj","parameters":[{"description":"CNPJ, punctuation allowed","in":"path","name":"cnpj","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CnpjLookup"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`applications_closed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cnpj_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: not a valid CNPJ"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cnpj_lookup_unavailable`: the registry did not answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Look up a company by CNPJ","tags":["Account"]}},"/storefront/shipping-estimates":{"post":{"description":"Quotes shipping for a set of variants without a cart, for the product\npage's \"calculate shipping\" box. Nothing is saved.","operationId":"estimateStorefrontShipping","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontShippingEstimateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontShippingEstimate"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_request`: no item with a positive quantity, or an invalid CEP"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"A variant is not in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`shipping_not_configured`: the store has no shipping set up"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`shipping_unavailable`: the carriers did not answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Estimate shipping for products","tags":["Cart"]}},"/storefront/store":{"get":{"description":"Name, currency, language, logo, public contact, the payment providers\nswitched on and whether pickup is offered: the data a storefront needs\nfor its header, footer and checkout choices. The store is the one the\n`X-Storefront-Key` belongs to.","operationId":"getStorefrontStore","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreInfo"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The store no longer exists"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get the store","tags":["Catalog"]}},"/storefront/wishlist":{"get":{"description":"The products they saved, newest first, with today's price and stock. A\nsigned-in customer's list is theirs; a visitor's is found by the\n`wishlist_id` cookie or `X-Wishlist-Id` header. The first request after\nsigning in moves the visitor's products into the customer's list.","operationId":"getStorefrontWishlist","parameters":[{"description":"The visitor's list; the `wishlist_id` cookie works too","in":"header","name":"x-wishlist-id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wishlist"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`: a bearer token was sent but is expired or belongs to another store"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"storefront_key":[]},{"customer_auth":[],"storefront_key":[]}],"summary":"The shopper's wishlist","tags":["Engagement"]},"patch":{"description":"For a signed-in customer: whether saved products send back-in-stock and\nprice-drop e-mails. Turning it on arms every saved product; turning it off\nstops the watches the list made (ones the customer asked for on a product\npage stay). Answers the whole list.","operationId":"updateStorefrontWishlist","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WishlistSettings"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wishlist"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`: only a signed-in customer has alerts to change"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Turn e-mail alerts on or off","tags":["Engagement"]}},"/storefront/wishlist/ids":{"get":{"description":"Just the ids, for a page that colours its hearts.","operationId":"getStorefrontWishlistIds","parameters":[{"description":"The visitor's list; the `wishlist_id` cookie works too","in":"header","name":"x-wishlist-id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WishlistIds"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`: a bearer token was sent but is expired or belongs to another store"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"storefront_key":[]},{"customer_auth":[],"storefront_key":[]}],"summary":"Saved product ids","tags":["Engagement"]}},"/storefront/wishlist/items/{product_ref}":{"delete":{"description":"Takes the product off the list and stops the e-mail alerts the list armed\nfor it. Removing one that is not saved is a no-op. Answers the whole list.","operationId":"removeStorefrontWishlistProduct","parameters":[{"description":"Product id or slug","in":"path","name":"product_ref","required":true,"schema":{"type":"string"}},{"description":"The visitor's list; the `wishlist_id` cookie works too","in":"header","name":"x-wishlist-id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wishlist"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"storefront_key":[]},{"customer_auth":[],"storefront_key":[]}],"summary":"Remove a product","tags":["Engagement"]},"put":{"description":"Adds the product to the shopper's list; saving it again is a no-op. A\nvisitor gets a list (and the `wishlist_id` cookie, also sent as the\n`X-Wishlist-Id` response header) on the first save. A signed-in customer\nwith alerts on is e-mailed when a sold-out product returns or its price\ndrops. Answers the whole list.","operationId":"saveStorefrontWishlistProduct","parameters":[{"description":"Product id or slug","in":"path","name":"product_ref","required":true,"schema":{"type":"string"}},{"description":"The visitor's list; the `wishlist_id` cookie works too","in":"header","name":"x-wishlist-id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveProduct"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wishlist"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`, or `variant_not_found`: the variant is not one of the product's"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`wishlist_full`: the list holds 200 products"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: too many new visitor lists from this address","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"storefront_key":[]},{"customer_auth":[],"storefront_key":[]}],"summary":"Save a product","tags":["Engagement"]}},"/storefront/wishlist/share":{"delete":{"description":"The link stops working; sharing again makes a new one.","operationId":"unshareStorefrontWishlist","responses":{"204":{"description":"Not shared any more (also when it was not)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Stop sharing the wishlist","tags":["Engagement"]},"post":{"description":"Makes a link to the signed-in customer's list that anyone can open, to see\nwhat is saved (titles, today's price, stock; never alerts or saved prices).\nAsking again returns the same link.","operationId":"shareStorefrontWishlist","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WishlistShare"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_signed_in`: only a signed-in customer's list can be shared"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cross_origin`: a cookie session asked from another site"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{"customer_auth":[],"storefront_key":[]}],"summary":"Share the wishlist","tags":["Engagement"]}},"/storefront/wishlists/shared/{token}":{"get":{"description":"What a customer chose to share by link. No sign-in. 404 `not_shared` when\nthe link is unknown or was stopped.","operationId":"getStorefrontSharedWishlist","parameters":[{"description":"The secret in the share link","in":"path","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharedWishlist"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_shared`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"A shared wishlist","tags":["Engagement"]}},"/widget/{key}/bootstrap":{"get":{"description":"Everything the chat widget needs to render before a conversation\nexists. Public; the channel's allowed origins apply.","operationId":"getWidgetBootstrap","parameters":[{"description":"The chat channel's public key (`data-key` of the embed script)","in":"path","name":"key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetBootstrap"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`origin_not_allowed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_found`: no enabled chat channel with this key"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[],"summary":"Get the chat widget settings","tags":["Chat Widget"]}},"/widget/{key}/conversations":{"post":{"description":"Opens a conversation on the store's chat channel and returns the token\nthat proves ownership. At most 10 per minute per client address.","operationId":"startWidgetConversation","parameters":[{"description":"The chat channel's public key (`data-key` of the embed script)","in":"path","name":"key","required":true,"schema":{"type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetStartRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetStartResponse"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bad_identity`: `identity` is invalid, expired or for another channel"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`origin_not_allowed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`slow_down` (`error`): too many new chats from this address","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[],"summary":"Start a chat","tags":["Chat Widget"]}},"/widget/{key}/conversations/{conversation_id}":{"get":{"operationId":"getWidgetConversation","parameters":[{"description":"The chat channel's public key (`data-key` of the embed script)","in":"path","name":"key","required":true,"schema":{"type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The token `POST /widget/{key}/conversations` returned. Prefer the\n`X-Visitor-Token` header; the query parameter is for clients that\ncannot set headers.","in":"query","name":"token","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetConversation"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bad_token`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`origin_not_allowed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[],"summary":"Get the chat","tags":["Chat Widget"]},"patch":{"description":"Fields left out are kept. A matching customer of the store is linked.","operationId":"updateWidgetContact","parameters":[{"description":"The chat channel's public key (`data-key` of the embed script)","in":"path","name":"key","required":true,"schema":{"type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The token `POST /widget/{key}/conversations` returned. Prefer the\n`X-Visitor-Token` header; the query parameter is for clients that\ncannot set headers.","in":"query","name":"token","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetContactRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetConversation"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bad_token`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`origin_not_allowed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[],"summary":"Update the shopper's contact details","tags":["Chat Widget"]}},"/widget/{key}/conversations/{conversation_id}/cart":{"get":{"description":"The cart the team or the bot assembled in this chat, with its payment\nlink. Authenticated with the visitor token like the rest of the widget\nAPI.","operationId":"getWidgetCart","parameters":[{"description":"The chat channel's public key","in":"path","name":"key","required":true,"schema":{"type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The token `POST /widget/{key}/conversations` returned. Prefer the\n`X-Visitor-Token` header; the query parameter is for clients that\ncannot set headers.","in":"query","name":"token","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetCartResponse"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bad_token`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`origin_not_allowed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[],"summary":"Get the chat's cart","tags":["Chat Widget"]}},"/widget/{key}/conversations/{conversation_id}/csat":{"post":{"description":"The shopper's satisfaction score, 1 to 5, with an optional comment.","operationId":"rateWidgetConversation","parameters":[{"description":"The chat channel's public key (`data-key` of the embed script)","in":"path","name":"key","required":true,"schema":{"type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The token `POST /widget/{key}/conversations` returned. Prefer the\n`X-Visitor-Token` header; the query parameter is for clients that\ncannot set headers.","in":"query","name":"token","required":false,"schema":{"type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetCsatRequest"}}},"required":true},"responses":{"204":{"description":"Recorded"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_score`: not 1 to 5"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bad_token`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`origin_not_allowed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[],"summary":"Rate the chat","tags":["Chat Widget"]}},"/widget/{key}/conversations/{conversation_id}/messages":{"get":{"description":"The latest 200 messages, oldest first.","operationId":"listWidgetMessages","parameters":[{"description":"The chat channel's public key (`data-key` of the embed script)","in":"path","name":"key","required":true,"schema":{"type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The token `POST /widget/{key}/conversations` returned. Prefer the\n`X-Visitor-Token` header; the query parameter is for clients that\ncannot set headers.","in":"query","name":"token","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetThread"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bad_token`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`origin_not_allowed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[],"summary":"List the chat's messages","tags":["Chat Widget"]},"post":{"description":"At most 20 messages per minute per conversation. A resolved or snoozed\nconversation reopens; the bot answers when it is on.","operationId":"sendWidgetMessage","parameters":[{"description":"The chat channel's public key (`data-key` of the embed script)","in":"path","name":"key","required":true,"schema":{"type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The token `POST /widget/{key}/conversations` returned. Prefer the\n`X-Visitor-Token` header; the query parameter is for clients that\ncannot set headers.","in":"query","name":"token","required":false,"schema":{"type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetSendRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetSendResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`empty` (`error`): no text"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bad_token`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`origin_not_allowed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`slow_down` (`error`): over 20 messages a minute","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[],"summary":"Send a chat message","tags":["Chat Widget"]}},"/widget/{key}/conversations/{conversation_id}/messages/{message_id}/attachments/{index}":{"get":{"description":"The bytes of a file attached to a message in the visitor's own\nconversation (`payload.attachments[index]`). Only files the store keeps\nare served.","operationId":"downloadWidgetAttachment","parameters":[{"description":"The chat channel's public key (`data-key` of the embed script)","in":"path","name":"key","required":true,"schema":{"type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Message id","in":"path","name":"message_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Position in `payload.attachments`","in":"path","name":"index","required":true,"schema":{"format":"int32","type":"integer"}},{"description":"The token `POST /widget/{key}/conversations` returned. Prefer the\n`X-Visitor-Token` header; the query parameter is for clients that\ncannot set headers.","in":"query","name":"token","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{}},"description":"The file"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bad_token`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`origin_not_allowed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[],"summary":"Download a file the team sent","tags":["Chat Widget"]}},"/widget/{key}/conversations/{conversation_id}/read":{"post":{"description":"The shopper saw the team's messages: they turn `read` for the team.","operationId":"markWidgetConversationRead","parameters":[{"description":"The chat channel's public key (`data-key` of the embed script)","in":"path","name":"key","required":true,"schema":{"type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The token `POST /widget/{key}/conversations` returned. Prefer the\n`X-Visitor-Token` header; the query parameter is for clients that\ncannot set headers.","in":"query","name":"token","required":false,"schema":{"type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"204":{"description":"Marked read"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bad_token`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`origin_not_allowed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[],"summary":"Mark the chat as read","tags":["Chat Widget"]}}},"security":[{"storefront_key":[]}],"servers":[{"description":"Production","url":"https://api.mobiari.com/v1"},{"description":"Local development","url":"http://localhost:4000/v1"}],"tags":[{"description":"The store behind the key: name, currency, contact and what it accepts","name":"Store"},{"description":"Products, categories and collections as shoppers see them","name":"Catalog"},{"description":"The shopper's cart: create it, then add lines, contact details, shipping and discounts under `/carts/{cart_id}`. Every change answers with the whole cart. Server-rendered themes use `current` as the id for the cart their `cart_id` cookie names","name":"Cart"},{"description":"Turning the cart into a paid order: payment methods, installments, payments and confirmation","name":"Checkout"},{"description":"Store locations and pickup points","name":"Locations"},{"description":"Customer sign-in, profile, addresses, orders, returns and credit","name":"Account"},{"description":"Reviews, wishlists and product alerts","name":"Engagement"},{"description":"Booking a service: the services and the providers who deliver them, the free times, booking, and seeing, moving or cancelling a booking by the token it answered with. Open only while the store has online booking on","name":"Bookings"},{"description":"The store's content for a site that renders its own pages: content pages, menus and CMS documents (a blog is a CMS collection), the same a Liquid theme gets. Addresses are paths on the store's domain","name":"Content"},{"description":"The store's forms (contact, quote request…): the fields to render and where to send them. Values are validated by type (CPF/CNPJ, phone, CEP, e-mail)","name":"Forms"},{"description":"The store's popups for the page a shopper is on, the view count, and the signup that records consent and answers with a single-use coupon","name":"Popups"},{"description":"Server-to-server order intake for an external storefront that takes payment itself, authenticated by the sales channel's secret API key in `X-Channel-Key`. Never ship that key to a browser","name":"Channel API"},{"description":"The visitor API behind the chat widget, addressed by the inbox channel's public key","name":"Chat Widget"}]}