{"openapi":"3.1.0","info":{"title":"DigiZay Public Shopping API","version":"1.1.0","description":"Public discovery and read-only price lookup. These operations never buy, pay, reserve stock or issue payment QR codes. Ordinary quotes allow guests; Flash Sale quotes require an explicit offer ID and login when the offer loginRequired flag is true. Browser purchases follow /ai-shopping.txt; optional Customer Shopping MCP has its own confirmation flow."},"servers":[{"url":"https://digizay.com"}],"security":[],"externalDocs":{"description":"Browser-agent checkout guide","url":"https://digizay.com/ai-shopping.txt"},"paths":{"/api/catalog":{"get":{"operationId":"listPublicProducts","summary":"Read public product catalog","description":"Returns current public catalog data. price and sale describe ordinary pricing, not Flash Sale. Use returned canonical links from catalog v2 or product details; never attach a Flash price to an ordinary URL. Display prices and availability can change.","x-openai-isConsequential":false,"responses":{"200":{"description":"Public catalog","content":{"application/json":{"schema":{"type":"object","required":["products","categories","payments"],"properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"categories":{"type":"array","items":{"type":"object"}},"payments":{"type":"array","items":{"type":"object"}}}}}}},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/flash-sales":{"get":{"operationId":"listPublicFlashSales","summary":"Read public Flash Sale campaigns","description":"Public display snapshot with serverNow, campaign times, fixed sale prices and remaining quota. No stock is reserved. Match item.productId to the public catalog and preserve flash=item.id on its canonical URL. Offers with loginRequired require login to purchase, cannot stack coupons and do not apply to reseller pricing. Game checkout may be unsupported even when a game is listed.","x-openai-isConsequential":false,"responses":{"200":{"description":"Public offer snapshot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlashSales"}}}},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/checkout/quote":{"post":{"operationId":"quotePublicCheckout","summary":"Read the current price for one selected product","description":"Read-only calculation; no order, stock hold, QR or debit is created. Use an exact catalog product ID. Telecom packages require the customer-supplied phone and quantity 1. Ordinary quotes allow guests. Only pass flashSaleItemId when the customer chooses that offer; Flash requires a signed-in account only when loginRequired is true, excludes coupons and never falls back to ordinary pricing on error. Respect capabilities: supported PUBG, Telegram and Roblox top-up products require gameId (Player ID, Telegram username or Roblox username). Other unsupported games must not be purchased. Customer Shopping MCP accepts only products whose mcpCheckout capability is true. Confirm any changed price with the customer.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}}},"responses":{"200":{"description":"Exact quote in Myanmar kyat; optional Flash identity is separate from ordinary catalog prices.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/LoginRequired"},"403":{"$ref":"#/components/responses/Invalid"},"409":{"$ref":"#/components/responses/OfferUnavailable"},"429":{"$ref":"#/components/responses/Limited"},"503":{"$ref":"#/components/responses/Unavailable"}}}}},"components":{"schemas":{"Product":{"type":"object","required":["id","name","price"],"properties":{"id":{"type":"integer","minimum":1},"slug":{"type":"string"},"name":{"type":"string"},"variant":{"type":"string"},"cat":{"type":"string"},"desc":{"type":"string"},"price":{"type":"integer","minimum":0,"description":"Ordinary list price in MMK. Apply sale percent for the ordinary display price; this is not a Flash Sale price or final quote."},"sale":{"type":"number","minimum":0,"maximum":100},"stock":{"type":["integer","null"]},"inStock":{"type":"boolean"}}},"FlashSales":{"type":"object","required":["serverNow","campaigns"],"properties":{"serverNow":{"type":"string","format":"date-time"},"campaigns":{"type":"array","items":{"$ref":"#/components/schemas/FlashCampaign"}}}},"FlashCampaign":{"type":"object","required":["id","name","startsAt","endsAt","status","version","items"],"properties":{"id":{"type":"integer","minimum":1},"name":{"type":"string"},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","active","ended","paused","disabled"]},"version":{"type":"integer","minimum":1},"items":{"type":"array","items":{"$ref":"#/components/schemas/FlashItem"}}}},"FlashItem":{"type":"object","required":["id","productId","saleUnitPriceMmk","quota","heldQty","soldQty","availableQty","loginRequired"],"properties":{"id":{"type":"integer","minimum":1,"description":"Exact offer ID: URL flash parameter and quote flashSaleItemId."},"productId":{"type":"integer","minimum":1},"saleUnitPriceMmk":{"type":"integer","minimum":1,"description":"Fixed conditional offer unit price; not the ordinary product price."},"quota":{"type":"integer","minimum":1},"heldQty":{"type":"integer","minimum":0},"soldQty":{"type":"integer","minimum":0},"availableQty":{"type":"integer","minimum":0},"loginRequired":{"type":"boolean"},"eligible":{"type":"boolean"}}},"QuoteRequest":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"object","required":["productId","qty"],"additionalProperties":false,"properties":{"productId":{"type":"integer","minimum":1,"maximum":2147483647},"qty":{"type":"integer","minimum":1,"maximum":100},"expectedUnitMmk":{"type":"integer","minimum":1,"description":"Optional expected unit price; a mismatch requires fresh customer confirmation."}}}},"paymentMethod":{"type":"string","enum":["MMQR","Balance"],"default":"MMQR","description":"Balance requires the current signed-in customer. Never treat public catalog access as wallet authority."},"phone":{"type":"string","maxLength":30,"description":"Customer-supplied mobile destination when required; never guess."},"gameId":{"type":"string","maxLength":32,"description":"Customer-supplied PUBG Player ID, Telegram username or Roblox username, only when requiredInputs lists gameId."},"couponCode":{"type":"string","maxLength":80,"description":"Ordinary purchases only. Flash Sale rejects coupon stacking."},"flashSaleItemId":{"type":"integer","minimum":1,"maximum":2147483647,"description":"Explicit opt-in offer ID returned by /api/flash-sales. Requires login when the offer loginRequired flag is true, exact product match, live campaign and quota. Never drop this field automatically after an error."},"flashReservation":{"type":"string","pattern":"^[a-f0-9]{32}$","description":"Optional private reservation returned by the same checkout. Preserve it on retries; never include it in a public URL or invent it. A quote does not create or renew a reservation."},"checkoutIntent":{"type":"string","pattern":"^[a-f0-9]{32}$","description":"Optional private original checkout identity for resuming the same checkout; never invent or publish it."}}},"Quote":{"type":"object","required":["totalMmk"],"properties":{"totalMmk":{"type":"integer","minimum":0},"subtotalMmk":{"type":"integer","minimum":0},"listTotalMmk":{"type":"integer","minimum":0},"discountMmk":{"type":"integer","minimum":0},"automaticDiscountMmk":{"type":"integer","minimum":0},"couponDiscountMmk":{"type":"integer","minimum":0},"discountPercent":{"type":"number"},"coupon":{"type":["object","null"]},"flashSale":{"$ref":"#/components/schemas/FlashQuote"}}},"FlashQuote":{"type":"object","required":["itemId","campaignId","productId","qty","unitPriceMmk","totalMmk","version"],"properties":{"itemId":{"type":"integer","minimum":1},"campaignId":{"type":"integer","minimum":1},"productId":{"type":"integer","minimum":1},"qty":{"type":"integer","minimum":1},"unitPriceMmk":{"type":"integer","minimum":1},"totalMmk":{"type":"integer","minimum":1},"version":{"type":"integer","minimum":1},"reservationToken":{"type":"string","pattern":"^[a-f0-9]{32}$","description":"Present only when resuming an existing reservation. Private; never put in public URLs."},"expiresAt":{"type":"string","format":"date-time","description":"Existing reservation deadline; this quote does not extend it."}}},"Error":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","description":"May include FLASH_LOGIN_REQUIRED, FLASH_ITEM_MISMATCH, FLASH_NOT_STARTED, FLASH_ENDED, FLASH_PAUSED, FLASH_SOLD_OUT, FLASH_USER_LIMIT, FLASH_RESERVATION_INVALID, FLASH_RESERVATION_EXPIRED, FLASH_COUPON_NOT_ALLOWED, FLASH_CHANNEL_UNAVAILABLE."}}}},"responses":{"Invalid":{"description":"Invalid input, unsupported checkout, unavailable product or changed price. Follow the returned code; do not invent identifiers or recipient details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"LoginRequired":{"description":"Flash Sale requires the current signed-in account (FLASH_LOGIN_REQUIRED). Hand login to the customer. Do not downgrade to ordinary pricing without their explicit choice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"OfferUnavailable":{"description":"Changed price, expired/sold-out/paused offer, quota limit or invalid reservation. No automatic fallback to an ordinary-price purchase; reread offers and ask the customer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Limited":{"description":"Rate limited. Respect Retry-After; do not switch identities to bypass the limit."},"Unavailable":{"description":"Temporarily unavailable or maintenance. Retry later; this is not proof of a payment failure."}}}}