{"openapi":"3.2.0","info":{"title":"devhelp shop API","version":"1.0.0","description":"Public Storefront and Admin REST API for devhelp shop. Authenticate Storefront endpoints with a publishable key (dh_pk_live_…) and Admin endpoints with a secret key (dh_sk_live_…) via x-api-key or Authorization: Bearer."},"servers":[{"url":"https://api.devhelp.pk","description":"devhelp shop API"}],"tags":[{"name":"Storefront — Store & Site","description":"Public store profile, site documents, navigation menus, pages, redirects, and sitemap."},{"name":"Storefront — Catalog","description":"Browse published products, variants, and collections."},{"name":"Storefront — Carts & Checkout","description":"Create and update shopper carts, apply discounts, quote delivery, and place orders."},{"name":"Storefront — Orders","description":"Look up shopper orders and complete online payment handoffs."},{"name":"Storefront — Customer Portal","description":"Passwordless customer OTP authentication, sessions, profile, saved addresses, communication preferences, and self-serve order editing."},{"name":"Storefront — Bookings & Enquiries","description":"Check bookable service availability and submit enquiries."},{"name":"Storefront — Community & Engagement","description":"Blog posts, product reviews, contact messages, newsletter sign-ups, and back-in-stock alerts."},{"name":"Admin — Catalog","description":"Create and manage products, variants, collections, and media."},{"name":"Admin — Inventory & Locations","description":"Track stock levels across locations and record stock adjustments."},{"name":"Admin — Orders","description":"Manage orders, COD confirmation, notes, holds, exchanges, refunds, and saved views."},{"name":"Admin — Fulfillments & Shipping","description":"Fulfillments, courier handovers, delivery problems, claims, shipping zones, and COD remittances."},{"name":"Admin — Customers & Discounts","description":"Customer records, discount codes, and automatic sale campaigns."},{"name":"Admin — Bookings & Enquiries","description":"Manage bookable services, staff, rooms, schedules, reminders, and customer enquiries."},{"name":"Admin — Content & Reviews","description":"Blog posts, FAQs, product reviews, buyer messages, newsletter subscribers, and URL redirects."},{"name":"Admin — Online Store & Site","description":"Site documents, releases, publishing, rollbacks, and templates."},{"name":"Admin — Webhooks","description":"Webhook endpoint subscriptions, delivery logs, and secret rotation."},{"name":"Admin — Store & Settings","description":"Store profile, domains, checkout and order settings, tax classes, and dashboard overview."}],"paths":{"/storefront/v1/blog":{"get":{"operationId":"storefront.blog.list","tags":["Storefront — Community & Engagement"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"categoryId","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"category","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"handle":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"excerpt":{"type":"string"},"authorName":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"featuredImage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]},"categories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"handle":{"type":"string"},"id":{"type":"string"}},"required":["name","handle","id"]}},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["handle","title","body","excerpt","authorName","tags","id","featuredImage","categories","seo","publishedAt","updatedAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/blog/{handle}":{"get":{"operationId":"storefront.blog.get","tags":["Storefront — Community & Engagement"],"parameters":[{"name":"handle","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"handle":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"excerpt":{"type":"string"},"authorName":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"featuredImage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]},"categories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"handle":{"type":"string"},"id":{"type":"string"}},"required":["name","handle","id"]}},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["handle","title","body","excerpt","authorName","tags","id","featuredImage","categories","seo","publishedAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/blog-categories":{"get":{"operationId":"storefront.blog.categories","tags":["Storefront — Community & Engagement"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"handle":{"type":"string"},"id":{"type":"string"}},"required":["name","handle","id"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/reviews":{"get":{"operationId":"storefront.reviews.list","tags":["Storefront — Community & Engagement"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"productId","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"rating","in":"query","required":false,"schema":{"type":"number"},"allowEmptyValue":true,"allowReserved":true},{"name":"withPhotos","in":"query","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"sort","in":"query","required":false,"schema":{"enum":["recent","highest","lowest","photos"],"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"displayName":{"type":"string"},"rating":{"type":"number"},"title":{"type":"string"},"body":{"type":"string"},"id":{"type":"string"},"productId":{"type":"string"},"verifiedPurchase":{"const":true},"reply":{"anyOf":[{"type":"string"},{"type":"null"}]},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"fit":{"anyOf":[{"enum":["small","true","large"],"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"}},"required":["id","url","width","height"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["displayName","rating","title","body","id","productId","verifiedPurchase","reply","variantTitle","fit","city","photos","createdAt","updatedAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"type":"number"},"average":{"anyOf":[{"type":"number"},{"type":"null"}]},"summary":{"type":"object","properties":{"count":{"type":"number"},"average":{"anyOf":[{"type":"number"},{"type":"null"}]},"histogram":{"type":"array","items":{"type":"number"}},"fit":{"anyOf":[{"type":"object","properties":{"small":{"type":"number"},"true":{"type":"number"},"large":{"type":"number"}},"required":["small","true","large"]},{"type":"null"}]},"withPhotos":{"type":"number"}},"required":["count","average","histogram","fit","withPhotos"]}},"required":["items","nextCursor","count","average","summary"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]},"post":{"operationId":"storefront.reviews.submit","tags":["Storefront — Community & Engagement"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string"},"rating":{"type":"number"},"title":{"type":"string"},"body":{"type":"string"},"orderId":{"type":"string"},"orderLineId":{"type":"string"},"token":{"type":"string"},"fit":{"anyOf":[{"enum":["small","true","large"],"type":"string"},{"type":"null"}]},"showCity":{"type":"boolean"},"photoIds":{"type":"array","items":{"type":"string"}}},"required":["displayName","rating","title","body","orderId","orderLineId","token"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","approved"],"type":"string"}},"required":["id","status"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/reviews/order":{"post":{"operationId":"storefront.reviews.order","tags":["Storefront — Community & Engagement"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string"},"token":{"type":"string"}},"required":["orderId","token"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string"},"orderNumber":{"type":"number"},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"type":"string"},"optedOut":{"type":"boolean"},"canPostpone":{"type":"boolean"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"reviewable":{"type":"boolean"},"askFit":{"type":"boolean"},"photos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"}},"required":["id","url","width","height"]}},"review":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"rating":{"type":"number"},"title":{"type":"string"},"body":{"type":"string"},"status":{"enum":["pending","approved","rejected","deleted"],"type":"string"},"fit":{"anyOf":[{"enum":["small","true","large"],"type":"string"},{"type":"null"}]},"showCity":{"type":"boolean"}},"required":["displayName","rating","title","body","status","fit","showCity"]},{"type":"null"}]}},"required":["id","productTitle","variantTitle","imageUrl","reviewable","askFit","photos","review"]}}},"required":["orderId","orderNumber","city","displayName","optedOut","canPostpone","lines"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/reviews/opt-out":{"post":{"operationId":"storefront.reviews.optOut","tags":["Storefront — Community & Engagement"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string"},"token":{"type":"string"}},"required":["orderId","token"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"const":true}},"required":["updated"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/reviews/postpone":{"post":{"operationId":"storefront.reviews.postpone","tags":["Storefront — Community & Engagement"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string"},"token":{"type":"string"}},"required":["orderId","token"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"const":true}},"required":["updated"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/reviews/photos":{"post":{"operationId":"storefront.reviews.reservePhoto","tags":["Storefront — Community & Engagement"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string"},"token":{"type":"string"},"orderLineId":{"type":"string"},"contentType":{"enum":["image/jpeg","image/png","image/webp"],"type":"string"},"byteSize":{"type":"number"}},"required":["orderId","token","orderLineId","contentType","byteSize"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"photoId":{"type":"string"},"uploadUrl":{"type":"string"},"contentType":{"enum":["image/jpeg","image/png","image/webp"],"type":"string"}},"required":["photoId","uploadUrl","contentType"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/reviews/photos/confirm":{"post":{"operationId":"storefront.reviews.confirmPhoto","tags":["Storefront — Community & Engagement"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string"},"token":{"type":"string"},"photoId":{"type":"string"}},"required":["orderId","token","photoId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"}},"required":["id","url","width","height"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/reviews/photos/remove":{"post":{"operationId":"storefront.reviews.removePhoto","tags":["Storefront — Community & Engagement"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string"},"token":{"type":"string"},"photoId":{"type":"string"}},"required":["orderId","token","photoId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"const":true}},"required":["updated"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/messages":{"post":{"operationId":"storefront.messages.submit","tags":["Storefront — Community & Engagement"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"consent":{"const":true}},"required":["name","email","phone","subject","body","consent"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"const":true}},"required":["received"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/enquiries":{"post":{"operationId":"storefront.enquiries.submit","summary":"Send a booking enquiry","description":"Stores the enquiry for the merchant to answer. Refused (403) while the store is not live.","tags":["Storefront — Bookings & Enquiries"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"phone":{"type":"string"},"serviceText":{"type":"string"},"preferredText":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"required":["name","phone","serviceText"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"const":true}},"required":["received"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/bookings/availability":{"get":{"operationId":"storefront.bookings.availability","summary":"Free starts for a visit","description":"Only people offered online. Never cached: the answer changes with every booking.","tags":["Storefront — Bookings & Enquiries"],"parameters":[{"name":"variantIds","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"staffIds","in":"query","required":false,"schema":{"type":"array","items":{"anyOf":[{"type":"string"},{"const":"any"}]}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"excludeLineBookingId","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"timezone":{"type":"string"},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"starts":{"type":"array","items":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staff":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}}},"required":["startsAt","staff"]}}},"required":["date","starts"]}}},"required":["timezone","days"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/bookings/setup":{"get":{"operationId":"storefront.bookings.setup","summary":"What the store offers online","description":"Hours, special dates, the people and services offered online. Setup only: cacheable.","tags":["Storefront — Bookings & Enquiries"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"boolean"},"timezone":{"type":"string"},"windowDays":{"type":"number"},"cancelWindowHours":{"type":"number"},"customerCanReschedule":{"type":"boolean"},"customerCanCancel":{"type":"boolean"},"policyText":{"type":"string"},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"number"},"opens":{"type":"string"},"closes":{"type":"string"}},"required":["weekday","opens","closes"]}},"specialDates":{"type":"array","items":{"type":"object","properties":{"startsOn":{"type":"string"},"endsOn":{"type":"string"},"closed":{"type":"boolean"},"opens":{"anyOf":[{"type":"string"},{"type":"null"}]},"closes":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"}},"required":["startsOn","endsOn","closed","opens","closes","label"]}},"staff":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"colourIndex":{"type":"number"},"photoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"productIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","title","colourIndex","photoUrl","productIds"]}},"services":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"staffChoice":{"enum":["choose","any_only","hidden"],"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"durationMin":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["variantId","durationMin"]}}},"required":["productId","staffChoice","variants"]}},"weekendDays":{"type":"array","items":{"type":"number"}},"sessions":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"minQuantity":{"type":"number"},"maxQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"asksParticipants":{"type":"boolean"},"tickets":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"takesPlace":{"type":"boolean"},"weekendPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"minAge":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxAge":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["variantId","takesPlace","weekendPricePaisa","minAge","maxAge"]}},"schedule":{"type":"array","items":{"type":"object","properties":{"weekdays":{"type":"array","items":{"type":"number"}},"startTimes":{"type":"array","items":{"type":"string"}},"durationMin":{"type":"number"}},"required":["weekdays","startTimes","durationMin"]}}},"required":["productId","minQuantity","maxQuantity","asksParticipants","tickets","schedule"]}},"packages":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"includedGuests":{"anyOf":[{"type":"number"},{"type":"null"}]},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"durationMin":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["variantId","durationMin"]}}},"required":["productId","includedGuests","variants"]}},"consentText":{"type":"string"}},"required":["available","timezone","windowDays","cancelWindowHours","customerCanReschedule","customerCanCancel","policyText","hours","specialDates","staff","services","weekendDays","sessions","packages","consentText"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/bookings/sessions":{"get":{"operationId":"storefront.bookings.sessions","summary":"Sessions of a product with places left","description":"At most a month of dates. Never cached: places change with every ticket sold.","tags":["Storefront — Bookings & Enquiries"],"parameters":[{"name":"productId","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"timezone":{"type":"string"},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"weekend":{"type":"boolean"},"sessions":{"type":"array","items":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"left":{"type":"number"},"state":{"enum":["open","sold_out","closed","started"],"type":"string"}},"required":["startsAt","endsAt","left","state"]}}},"required":["date","weekend","sessions"]}}},"required":["timezone","days"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/engagement/newsletter":{"post":{"operationId":"storefront.engagement.newsletter","summary":"Subscribe to the store newsletter","tags":["Storefront — Community & Engagement"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"form":{"enum":["newsletter","popup"],"type":"string"},"website":{"type":"string"}},"required":["email"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"subscribed":{"const":true}},"required":["subscribed"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/engagement/back-in-stock":{"post":{"operationId":"storefront.engagement.backInStock","summary":"Request one email when a variant is back in stock","tags":["Storefront — Community & Engagement"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"productId":{"type":"string"},"variantId":{"type":"string"},"email":{"type":"string"},"website":{"type":"string"}},"required":["productId","variantId","email"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"subscribed":{"const":true}},"required":["subscribed"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/engagement/unsubscribe":{"post":{"operationId":"storefront.engagement.unsubscribe","summary":"Cancel a stock alert with its unsubscribe token","tags":["Storefront — Community & Engagement"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"token":{"type":"string"}},"required":["id","token"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"unsubscribed":{"const":true}},"required":["unsubscribed"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/engagement/email-unsubscribe":{"post":{"operationId":"storefront.engagement.emailUnsubscribe","summary":"Stop a store's marketing emails with the token from one of them","tags":["Storefront — Community & Engagement"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"unsubscribed":{"const":true}},"required":["unsubscribed"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/engagement/click":{"post":{"operationId":"storefront.engagement.click","summary":"Record a click on a marketing email's link and say where it goes","tags":["Storefront — Community & Engagement"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"cartId":{"type":"string"},"cartToken":{"type":"string"}},"required":["token"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string"}},"required":["to"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/store":{"get":{"operationId":"storefront.store.get","summary":"Get the current store","tags":["Storefront — Store & Site"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"currency":{"enum":["PKR"],"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string","default":"PK"},"timezone":{"type":"string"},"theme":{"type":"object","properties":{"preset":{"enum":["counter","bazaar","truck-art"],"type":"string"},"accent":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"anyOf":[{"enum":["sm","md","lg"],"type":"string"},{"type":"null"}]},"appearance":{"enum":["system","light","dark"],"type":"string"},"fontPairing":{"enum":["figtree","editorial","modern","classic","urban"],"type":"string"},"productCard":{"enum":["standard","minimal","overlay"],"type":"string"},"density":{"enum":["comfortable","compact"],"type":"string"},"headingScale":{"enum":["s","m","l"],"type":"string"},"headingCase":{"enum":["normal","uppercase"],"type":"string"},"buttonShape":{"enum":["square","rounded","pill"],"type":"string"},"buttonStyle":{"enum":["solid","outline"],"type":"string"},"cardImageRatio":{"enum":["portrait","square","landscape"],"type":"string"}},"required":["preset","accent","radius","appearance","fontPairing","productCard","density","headingScale","headingCase","buttonShape","buttonStyle","cardImageRatio"]},"profile":{"type":"object","properties":{"logo":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]},"favicon":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"seoImage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}],"default":null},"announcement":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"text":{"type":"string"},"link":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"const":"home"}},"required":["type"]},{"type":"object","properties":{"type":{"const":"blog"}},"required":["type"]},{"type":"object","properties":{"type":{"const":"search"}},"required":["type"]},{"type":"object","properties":{"type":{"const":"collections"}},"required":["type"]},{"type":"object","properties":{"type":{"const":"collection"},"id":{"type":"string"}},"required":["type","id"]},{"type":"object","properties":{"type":{"const":"product"},"id":{"type":"string"}},"required":["type","id"]},{"type":"object","properties":{"type":{"const":"page"},"id":{"type":"string"}},"required":["type","id"]},{"type":"object","properties":{"type":{"const":"article"},"id":{"type":"string"}},"required":["type","id"]},{"type":"object","properties":{"type":{"const":"url"},"url":{"type":"string"}},"required":["type","url"]}]},{"type":"null"}]}},"required":["enabled","text","link"]},{"type":"null"}]},"contactEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"whatsappNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"socialLinks":{"type":"object","propertyNames":{"enum":["facebook","instagram","tiktok","youtube","x"],"type":"string"},"additionalProperties":{"type":"string"}}},"required":["logo","favicon","announcement","contactEmail","contactPhone","whatsappNumber","address","socialLinks"]},"policies":{"type":"array","items":{"type":"object","properties":{"handle":{"type":"string"},"title":{"type":"string"},"kind":{"enum":["page","contact","policy_refund","policy_shipping","policy_privacy","policy_terms"],"type":"string"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["handle","title","kind","updatedAt"]}},"primaryHost":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkout":{"type":"object","properties":{"emailMode":{"enum":["off","optional","required"],"type":"string"},"fields":{"type":"object","properties":{"line2":{"enum":["hidden","optional","required"],"type":"string"},"landmark":{"enum":["hidden","optional","required"],"type":"string"},"postalCode":{"enum":["auto","hidden","optional","required"],"type":"string"}},"required":["line2","landmark","postalCode"]},"orderNotes":{"type":"boolean"},"trustMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"hiddenPolicies":{"type":"array","items":{"type":"string"}},"requireTerms":{"type":"boolean"}},"required":["emailMode","fields","orderNotes","trustMessage","hiddenPolicies","requireTerms"]},"whatsappUpdates":{"type":"boolean"},"customerPortal":{"type":"object","properties":{"enabled":{"type":"boolean"},"showHeaderLink":{"type":"boolean"},"loginMethods":{"type":"object","properties":{"emailOtp":{"type":"boolean"},"whatsappOtp":{"type":"boolean"},"smsOtp":{"type":"boolean"}},"required":["emailOtp","whatsappOtp","smsOtp"]},"allowAddressBook":{"type":"boolean"},"allowMarketingOptIn":{"type":"boolean"},"showSmsPreferences":{"type":"boolean"},"allowReorder":{"type":"boolean"},"allowCodSelfConfirm":{"type":"boolean"},"allowDeliveryEdit":{"type":"boolean"},"deliveryEditCutoff":{"enum":["before_confirmed","before_packed","before_dispatched"],"type":"string"},"deliveryEditWindowMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowCityProvinceChange":{"type":"boolean"},"allowPrepaidDeliveryEdit":{"type":"boolean"},"allowOrderNoteEdit":{"type":"boolean"},"allowOrderCancellation":{"type":"boolean"},"cancellationCutoff":{"enum":["before_confirmed","before_packed","before_dispatched"],"type":"string"},"cancellationWindowMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowPrepaidCancellation":{"type":"boolean"},"allowVariantSwap":{"type":"boolean"},"variantSwapCutoff":{"enum":["before_confirmed","before_packed","before_dispatched"],"type":"string"},"allowCodItemEdits":{"type":"boolean"},"codItemEditWindowMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowReturnRequests":{"type":"boolean"},"returnWindowDays":{"type":"number"}},"required":["enabled","showHeaderLink","loginMethods","allowAddressBook","allowMarketingOptIn","showSmsPreferences","allowReorder","allowCodSelfConfirm","allowDeliveryEdit","deliveryEditCutoff","deliveryEditWindowMinutes","allowCityProvinceChange","allowPrepaidDeliveryEdit","allowOrderNoteEdit","allowOrderCancellation","cancellationCutoff","cancellationWindowMinutes","allowPrepaidCancellation","allowVariantSwap","variantSwapCutoff","allowCodItemEdits","codItemEditWindowMinutes","allowReturnRequests","returnWindowDays"]},"shippingCoverage":{"type":"object","properties":{"countries":{"type":"array","items":{"type":"object","properties":{"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"regionRestriction":{"enum":["all","only"],"type":"string"},"allowedRegions":{"type":"array","items":{"type":"string"}},"excludedRegions":{"type":"array","items":{"type":"string"}},"cityOnlyRegions":{"type":"array","items":{"type":"string"}},"cityRestriction":{"enum":["any","only"],"type":"string"},"allowedCities":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"normalized":{"type":"string"},"regionCode":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","normalized","regionCode"]}},"excludedCities":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"normalized":{"type":"string"},"regionCode":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","normalized","regionCode"]}}},"required":["country","regionRestriction","allowedRegions","excludedRegions","cityOnlyRegions","cityRestriction","allowedCities","excludedCities"]}}},"required":["countries"]},"codEnabled":{"type":"boolean","default":true},"codScope":{"enum":["domestic","selected_zones","all"],"type":"string","default":"domestic"}},"required":["id","slug","name","currency","timezone","theme","profile","policies","primaryHost","checkout","whatsappUpdates","customerPortal","shippingCoverage"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/products/{slug}/merchandising":{"get":{"operationId":"storefront.products.merchandising","summary":"Get related products and published information tabs","tags":["Storefront — Catalog"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"related":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"sizeGuide":{"type":"boolean"},"page":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"}},"required":["id","handle","title","body"]}},"required":["title","page"]}}},"required":["related","tabs"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/products":{"get":{"operationId":"storefront.products.list","summary":"List published products","tags":["Storefront — Catalog"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"collection","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"minPricePaisa","in":"query","schema":{"type":"number"},"allowEmptyValue":true,"allowReserved":true},{"name":"maxPricePaisa","in":"query","schema":{"type":"number"},"allowEmptyValue":true,"allowReserved":true},{"name":"available","in":"query","schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"vendor","in":"query","schema":{"type":"array","items":{"type":"string"}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"productType","in":"query","schema":{"type":"array","items":{"type":"string"}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"option","in":"query","schema":{"type":"array","items":{"type":"string"}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"sort","in":"query","schema":{"enum":["featured","newest","price_asc","price_desc","title_asc"],"type":"string","default":"featured"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/products/facets":{"get":{"operationId":"storefront.products.facets","summary":"Count published products by filter value","description":"Takes the same filters as the product list and answers how many products match each vendor, type, option value and availability, plus the price range — for a filter panel.","tags":["Storefront — Catalog"],"parameters":[{"name":"collection","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"minPricePaisa","in":"query","schema":{"type":"number"},"allowEmptyValue":true,"allowReserved":true},{"name":"maxPricePaisa","in":"query","schema":{"type":"number"},"allowEmptyValue":true,"allowReserved":true},{"name":"available","in":"query","schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"vendor","in":"query","schema":{"type":"array","items":{"type":"string"}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"productType","in":"query","schema":{"type":"array","items":{"type":"string"}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"option","in":"query","schema":{"type":"array","items":{"type":"string"}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"vendors":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"number"}},"required":["value","count"]}},"productTypes":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"number"}},"required":["value","count"]}},"options":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"values":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"number"}},"required":["value","count"]}}},"required":["name","values"]}},"available":{"type":"number"},"price":{"anyOf":[{"type":"object","properties":{"minPaisa":{"type":"number"},"maxPaisa":{"type":"number"}},"required":["minPaisa","maxPaisa"]},{"type":"null"}]},"total":{"type":"number"}},"required":["vendors","productTypes","options","available","price","total"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/products/{slug}":{"get":{"operationId":"storefront.products.get","summary":"Get a published product by slug","description":"Slug rather than id: it is what a storefront URL actually carries.","tags":["Storefront — Catalog"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/collections":{"get":{"operationId":"storefront.collections.list","summary":"List published collections","tags":["Storefront — Catalog"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"sort","in":"query","schema":{"enum":["newest","title_asc"],"type":"string","default":"newest"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"mode":{"enum":["manual","automated"],"type":"string"},"rules":{"anyOf":[{"type":"object","properties":{"match":{"enum":["all","any"],"type":"string"},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"enum":["title","product_type","vendor","tag","price","compare_at_price","inventory"],"type":"string"},"operator":{"enum":["equals","not_equals","contains","not_contains","starts_with","ends_with","greater_than","less_than","is_set","is_not_set"],"type":"string"},"value":{"type":"string","default":""}},"required":["field","operator"]}}},"required":["match","conditions"]},{"type":"null"}]},"productCount":{"type":"number"},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","mode","rules","productCount","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/collections/{slug}":{"get":{"operationId":"storefront.collections.get","summary":"Get a published collection by slug","tags":["Storefront — Catalog"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"mode":{"enum":["manual","automated"],"type":"string"},"rules":{"anyOf":[{"type":"object","properties":{"match":{"enum":["all","any"],"type":"string"},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"enum":["title","product_type","vendor","tag","price","compare_at_price","inventory"],"type":"string"},"operator":{"enum":["equals","not_equals","contains","not_contains","starts_with","ends_with","greater_than","less_than","is_set","is_not_set"],"type":"string"},"value":{"type":"string","default":""}},"required":["field","operator"]}}},"required":["match","conditions"]},{"type":"null"}]},"productCount":{"type":"number"},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","mode","rules","productCount","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/carts":{"post":{"operationId":"storefront.carts.create","summary":"Create a cart","description":"Returns the cart together with its token. The token is shown exactly once and stored hashed, so it cannot be recovered afterwards — keep it for the session.","tags":["Storefront — Carts & Checkout"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"variantId":{"type":"string"},"quantity":{"type":"number","default":1}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["active","converted","abandoned","deleted"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"requiresShipping":{"type":"boolean"},"shippingRateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productId":{"type":"string"},"productSlug":{"type":"string"},"title":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPricePaisa":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"booking":{"anyOf":[{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"visitKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["startsAt","endsAt","staffId","staffName","visitKey"]},{"type":"null"}]},"participantsNeeded":{"type":"number"},"participants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"age":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","age"]}},"ages":{"anyOf":[{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["min","max"]},{"type":"null"}]}},"required":["id","variantId","productId","productSlug","title","variantTitle","imageUrl","quantity","unitPricePaisa","linePaisa","discountPaisa","sale","kind","booking","participantsNeeded","participants","ages"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"discountCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"applied":{"type":"boolean"},"reason":{"anyOf":[{"enum":["not_found","disabled","not_started","expired","minimum_not_met","not_eligible_customer","usage_limit_reached","already_used_by_customer","does_not_apply_to_items","does_not_apply_to_shipping","not_combinable","sale_not_combinable"],"type":"string"},{"type":"null"}]}},"required":["code","applied","reason"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentMethods":{"type":"array","items":{"type":"object","properties":{"id":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"label":{"type":"string"},"kind":{"enum":["offline","redirect"],"type":"string"},"testMode":{"type":"boolean"},"feePaisa":{"type":"number"},"unavailable":{"type":"boolean"},"unavailableReason":{"type":"string"}},"required":["id","label","kind","testMode","feePaisa"]}},"depositPaisa":{"type":"number"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"consent":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"accepted":{"type":"boolean"}},"required":["text","accepted"]},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"token":{"type":"string"}},"required":["id","status","email","phone","name","shippingAddress","billingAddress","requiresShipping","shippingRateId","lines","discounts","discountCodes","sales","totals","paymentMethod","paymentMethods","depositPaisa","advanceInstructions","consent","expiresAt","createdAt","updatedAt","token"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/carts/{cartId}":{"get":{"operationId":"storefront.carts.get","summary":"Get a cart with its totals","description":"Totals are recomputed from live prices on every read; nothing is cached, so a cart left open overnight is quoted today's prices rather than yesterday's.","tags":["Storefront — Carts & Checkout"],"parameters":[{"name":"cartId","in":"path","required":true,"schema":{"type":"string"}},{"name":"token","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["active","converted","abandoned","deleted"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"requiresShipping":{"type":"boolean"},"shippingRateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productId":{"type":"string"},"productSlug":{"type":"string"},"title":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPricePaisa":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"booking":{"anyOf":[{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"visitKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["startsAt","endsAt","staffId","staffName","visitKey"]},{"type":"null"}]},"participantsNeeded":{"type":"number"},"participants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"age":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","age"]}},"ages":{"anyOf":[{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["min","max"]},{"type":"null"}]}},"required":["id","variantId","productId","productSlug","title","variantTitle","imageUrl","quantity","unitPricePaisa","linePaisa","discountPaisa","sale","kind","booking","participantsNeeded","participants","ages"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"discountCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"applied":{"type":"boolean"},"reason":{"anyOf":[{"enum":["not_found","disabled","not_started","expired","minimum_not_met","not_eligible_customer","usage_limit_reached","already_used_by_customer","does_not_apply_to_items","does_not_apply_to_shipping","not_combinable","sale_not_combinable"],"type":"string"},{"type":"null"}]}},"required":["code","applied","reason"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentMethods":{"type":"array","items":{"type":"object","properties":{"id":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"label":{"type":"string"},"kind":{"enum":["offline","redirect"],"type":"string"},"testMode":{"type":"boolean"},"feePaisa":{"type":"number"},"unavailable":{"type":"boolean"},"unavailableReason":{"type":"string"}},"required":["id","label","kind","testMode","feePaisa"]}},"depositPaisa":{"type":"number"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"consent":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"accepted":{"type":"boolean"}},"required":["text","accepted"]},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","email","phone","name","shippingAddress","billingAddress","requiresShipping","shippingRateId","lines","discounts","discountCodes","sales","totals","paymentMethod","paymentMethods","depositPaisa","advanceInstructions","consent","expiresAt","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]},"patch":{"operationId":"storefront.carts.update","summary":"Set contact details, delivery address, shipping option, or discount codes","tags":["Storefront — Carts & Checkout"],"parameters":[{"name":"cartId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string","default":""},"postalCode":{"type":"string","default":""},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string","default":"PK"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string","default":""},"postalCode":{"type":"string","default":""},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string","default":"PK"}},"required":["name","line1","city"]},{"type":"null"}]},"shippingRateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"discountCodes":{"type":"array","items":{"type":"string"}},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"emailOffers":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"lineId":{"type":"string"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"age":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","age"]}}},"required":["lineId","people"]}},"consent":{"type":"boolean"}},"required":["token"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["active","converted","abandoned","deleted"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"requiresShipping":{"type":"boolean"},"shippingRateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productId":{"type":"string"},"productSlug":{"type":"string"},"title":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPricePaisa":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"booking":{"anyOf":[{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"visitKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["startsAt","endsAt","staffId","staffName","visitKey"]},{"type":"null"}]},"participantsNeeded":{"type":"number"},"participants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"age":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","age"]}},"ages":{"anyOf":[{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["min","max"]},{"type":"null"}]}},"required":["id","variantId","productId","productSlug","title","variantTitle","imageUrl","quantity","unitPricePaisa","linePaisa","discountPaisa","sale","kind","booking","participantsNeeded","participants","ages"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"discountCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"applied":{"type":"boolean"},"reason":{"anyOf":[{"enum":["not_found","disabled","not_started","expired","minimum_not_met","not_eligible_customer","usage_limit_reached","already_used_by_customer","does_not_apply_to_items","does_not_apply_to_shipping","not_combinable","sale_not_combinable"],"type":"string"},{"type":"null"}]}},"required":["code","applied","reason"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentMethods":{"type":"array","items":{"type":"object","properties":{"id":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"label":{"type":"string"},"kind":{"enum":["offline","redirect"],"type":"string"},"testMode":{"type":"boolean"},"feePaisa":{"type":"number"},"unavailable":{"type":"boolean"},"unavailableReason":{"type":"string"}},"required":["id","label","kind","testMode","feePaisa"]}},"depositPaisa":{"type":"number"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"consent":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"accepted":{"type":"boolean"}},"required":["text","accepted"]},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","email","phone","name","shippingAddress","billingAddress","requiresShipping","shippingRateId","lines","discounts","discountCodes","sales","totals","paymentMethod","paymentMethods","depositPaisa","advanceInstructions","consent","expiresAt","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/carts/{cartId}/lines":{"post":{"operationId":"storefront.carts.addLine","summary":"Add a variant to the cart","description":"Adding a variant already in the cart increases its quantity rather than creating a second line. Availability is checked; no stock is reserved.","tags":["Storefront — Carts & Checkout"],"parameters":[{"name":"cartId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"variantId":{"type":"string"},"quantity":{"type":"number","default":1},"booking":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"const":"any"}],"default":"any"},"visitKey":{"type":"string"},"participants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"age":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","age"]}}},"required":["startsAt"]}},"required":["token","variantId"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["active","converted","abandoned","deleted"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"requiresShipping":{"type":"boolean"},"shippingRateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productId":{"type":"string"},"productSlug":{"type":"string"},"title":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPricePaisa":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"booking":{"anyOf":[{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"visitKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["startsAt","endsAt","staffId","staffName","visitKey"]},{"type":"null"}]},"participantsNeeded":{"type":"number"},"participants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"age":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","age"]}},"ages":{"anyOf":[{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["min","max"]},{"type":"null"}]}},"required":["id","variantId","productId","productSlug","title","variantTitle","imageUrl","quantity","unitPricePaisa","linePaisa","discountPaisa","sale","kind","booking","participantsNeeded","participants","ages"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"discountCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"applied":{"type":"boolean"},"reason":{"anyOf":[{"enum":["not_found","disabled","not_started","expired","minimum_not_met","not_eligible_customer","usage_limit_reached","already_used_by_customer","does_not_apply_to_items","does_not_apply_to_shipping","not_combinable","sale_not_combinable"],"type":"string"},{"type":"null"}]}},"required":["code","applied","reason"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentMethods":{"type":"array","items":{"type":"object","properties":{"id":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"label":{"type":"string"},"kind":{"enum":["offline","redirect"],"type":"string"},"testMode":{"type":"boolean"},"feePaisa":{"type":"number"},"unavailable":{"type":"boolean"},"unavailableReason":{"type":"string"}},"required":["id","label","kind","testMode","feePaisa"]}},"depositPaisa":{"type":"number"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"consent":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"accepted":{"type":"boolean"}},"required":["text","accepted"]},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","email","phone","name","shippingAddress","billingAddress","requiresShipping","shippingRateId","lines","discounts","discountCodes","sales","totals","paymentMethod","paymentMethods","depositPaisa","advanceInstructions","consent","expiresAt","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/carts/{cartId}/lines/{lineId}":{"patch":{"operationId":"storefront.carts.updateLine","summary":"Change a line's quantity","description":"A quantity of zero removes the line.","tags":["Storefront — Carts & Checkout"],"parameters":[{"name":"cartId","in":"path","required":true,"schema":{"type":"string"}},{"name":"lineId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"quantity":{"type":"number"}},"required":["token","quantity"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["active","converted","abandoned","deleted"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"requiresShipping":{"type":"boolean"},"shippingRateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productId":{"type":"string"},"productSlug":{"type":"string"},"title":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPricePaisa":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"booking":{"anyOf":[{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"visitKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["startsAt","endsAt","staffId","staffName","visitKey"]},{"type":"null"}]},"participantsNeeded":{"type":"number"},"participants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"age":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","age"]}},"ages":{"anyOf":[{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["min","max"]},{"type":"null"}]}},"required":["id","variantId","productId","productSlug","title","variantTitle","imageUrl","quantity","unitPricePaisa","linePaisa","discountPaisa","sale","kind","booking","participantsNeeded","participants","ages"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"discountCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"applied":{"type":"boolean"},"reason":{"anyOf":[{"enum":["not_found","disabled","not_started","expired","minimum_not_met","not_eligible_customer","usage_limit_reached","already_used_by_customer","does_not_apply_to_items","does_not_apply_to_shipping","not_combinable","sale_not_combinable"],"type":"string"},{"type":"null"}]}},"required":["code","applied","reason"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentMethods":{"type":"array","items":{"type":"object","properties":{"id":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"label":{"type":"string"},"kind":{"enum":["offline","redirect"],"type":"string"},"testMode":{"type":"boolean"},"feePaisa":{"type":"number"},"unavailable":{"type":"boolean"},"unavailableReason":{"type":"string"}},"required":["id","label","kind","testMode","feePaisa"]}},"depositPaisa":{"type":"number"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"consent":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"accepted":{"type":"boolean"}},"required":["text","accepted"]},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","email","phone","name","shippingAddress","billingAddress","requiresShipping","shippingRateId","lines","discounts","discountCodes","sales","totals","paymentMethod","paymentMethods","depositPaisa","advanceInstructions","consent","expiresAt","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]},"delete":{"operationId":"storefront.carts.removeLine","summary":"Remove a line","tags":["Storefront — Carts & Checkout"],"parameters":[{"name":"cartId","in":"path","required":true,"schema":{"type":"string"}},{"name":"lineId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["active","converted","abandoned","deleted"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"requiresShipping":{"type":"boolean"},"shippingRateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productId":{"type":"string"},"productSlug":{"type":"string"},"title":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPricePaisa":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"booking":{"anyOf":[{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"visitKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["startsAt","endsAt","staffId","staffName","visitKey"]},{"type":"null"}]},"participantsNeeded":{"type":"number"},"participants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"age":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","age"]}},"ages":{"anyOf":[{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["min","max"]},{"type":"null"}]}},"required":["id","variantId","productId","productSlug","title","variantTitle","imageUrl","quantity","unitPricePaisa","linePaisa","discountPaisa","sale","kind","booking","participantsNeeded","participants","ages"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"discountCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"applied":{"type":"boolean"},"reason":{"anyOf":[{"enum":["not_found","disabled","not_started","expired","minimum_not_met","not_eligible_customer","usage_limit_reached","already_used_by_customer","does_not_apply_to_items","does_not_apply_to_shipping","not_combinable","sale_not_combinable"],"type":"string"},{"type":"null"}]}},"required":["code","applied","reason"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentMethods":{"type":"array","items":{"type":"object","properties":{"id":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"label":{"type":"string"},"kind":{"enum":["offline","redirect"],"type":"string"},"testMode":{"type":"boolean"},"feePaisa":{"type":"number"},"unavailable":{"type":"boolean"},"unavailableReason":{"type":"string"}},"required":["id","label","kind","testMode","feePaisa"]}},"depositPaisa":{"type":"number"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"consent":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"accepted":{"type":"boolean"}},"required":["text","accepted"]},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","email","phone","name","shippingAddress","billingAddress","requiresShipping","shippingRateId","lines","discounts","discountCodes","sales","totals","paymentMethod","paymentMethods","depositPaisa","advanceInstructions","consent","expiresAt","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/carts/{cartId}/discount-codes":{"post":{"operationId":"storefront.carts.addDiscountCode","summary":"Enter a discount code","description":"Adds the code to the cart, whether or not it applies: the cart's `discountCodes` says why one did not, so the shopper can be told.","tags":["Storefront — Carts & Checkout"],"parameters":[{"name":"cartId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"code":{"type":"string"}},"required":["token","code"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["active","converted","abandoned","deleted"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"requiresShipping":{"type":"boolean"},"shippingRateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productId":{"type":"string"},"productSlug":{"type":"string"},"title":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPricePaisa":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"booking":{"anyOf":[{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"visitKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["startsAt","endsAt","staffId","staffName","visitKey"]},{"type":"null"}]},"participantsNeeded":{"type":"number"},"participants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"age":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","age"]}},"ages":{"anyOf":[{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["min","max"]},{"type":"null"}]}},"required":["id","variantId","productId","productSlug","title","variantTitle","imageUrl","quantity","unitPricePaisa","linePaisa","discountPaisa","sale","kind","booking","participantsNeeded","participants","ages"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"discountCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"applied":{"type":"boolean"},"reason":{"anyOf":[{"enum":["not_found","disabled","not_started","expired","minimum_not_met","not_eligible_customer","usage_limit_reached","already_used_by_customer","does_not_apply_to_items","does_not_apply_to_shipping","not_combinable","sale_not_combinable"],"type":"string"},{"type":"null"}]}},"required":["code","applied","reason"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentMethods":{"type":"array","items":{"type":"object","properties":{"id":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"label":{"type":"string"},"kind":{"enum":["offline","redirect"],"type":"string"},"testMode":{"type":"boolean"},"feePaisa":{"type":"number"},"unavailable":{"type":"boolean"},"unavailableReason":{"type":"string"}},"required":["id","label","kind","testMode","feePaisa"]}},"depositPaisa":{"type":"number"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"consent":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"accepted":{"type":"boolean"}},"required":["text","accepted"]},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","email","phone","name","shippingAddress","billingAddress","requiresShipping","shippingRateId","lines","discounts","discountCodes","sales","totals","paymentMethod","paymentMethods","depositPaisa","advanceInstructions","consent","expiresAt","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/carts/{cartId}/discount-codes/{code}":{"delete":{"operationId":"storefront.carts.removeDiscountCode","summary":"Remove a discount code","tags":["Storefront — Carts & Checkout"],"parameters":[{"name":"cartId","in":"path","required":true,"schema":{"type":"string"}},{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["active","converted","abandoned","deleted"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"requiresShipping":{"type":"boolean"},"shippingRateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productId":{"type":"string"},"productSlug":{"type":"string"},"title":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPricePaisa":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"booking":{"anyOf":[{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"visitKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["startsAt","endsAt","staffId","staffName","visitKey"]},{"type":"null"}]},"participantsNeeded":{"type":"number"},"participants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"age":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","age"]}},"ages":{"anyOf":[{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["min","max"]},{"type":"null"}]}},"required":["id","variantId","productId","productSlug","title","variantTitle","imageUrl","quantity","unitPricePaisa","linePaisa","discountPaisa","sale","kind","booking","participantsNeeded","participants","ages"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"discountCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"applied":{"type":"boolean"},"reason":{"anyOf":[{"enum":["not_found","disabled","not_started","expired","minimum_not_met","not_eligible_customer","usage_limit_reached","already_used_by_customer","does_not_apply_to_items","does_not_apply_to_shipping","not_combinable","sale_not_combinable"],"type":"string"},{"type":"null"}]}},"required":["code","applied","reason"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentMethods":{"type":"array","items":{"type":"object","properties":{"id":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"label":{"type":"string"},"kind":{"enum":["offline","redirect"],"type":"string"},"testMode":{"type":"boolean"},"feePaisa":{"type":"number"},"unavailable":{"type":"boolean"},"unavailableReason":{"type":"string"}},"required":["id","label","kind","testMode","feePaisa"]}},"depositPaisa":{"type":"number"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"consent":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"accepted":{"type":"boolean"}},"required":["text","accepted"]},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","email","phone","name","shippingAddress","billingAddress","requiresShipping","shippingRateId","lines","discounts","discountCodes","sales","totals","paymentMethod","paymentMethods","depositPaisa","advanceInstructions","consent","expiresAt","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/carts/{cartId}/shipping-options":{"get":{"operationId":"storefront.carts.shippingOptions","summary":"Delivery options for the cart's address","description":"Priced for this cart, so a rate whose free-delivery threshold the subtotal has already cleared is returned at zero. Empty when no address is set, or when the merchant covers no zone matching the destination. Pass `country`, `province`, or `city` to estimate delivery before the full address is known; nothing is saved on the cart.","tags":["Storefront — Carts & Checkout"],"parameters":[{"name":"cartId","in":"path","required":true,"schema":{"type":"string"}},{"name":"token","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"country","in":"query","required":false,"schema":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"province","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"city","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"options":{"type":"array","items":{"type":"object","properties":{"rateId":{"type":"string"},"name":{"type":"string"},"pricePaisa":{"type":"number"},"free":{"type":"boolean"},"minDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"customsNote":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"totalPaisa":{"type":"number"},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]}},"required":["rateId","name","pricePaisa","free","minDays","maxDays","totalPaisa","totals"]}}},"required":["options"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/carts/{cartId}/checkout":{"post":{"operationId":"storefront.carts.checkout","summary":"Place a cash-on-delivery order from the cart","description":"Requires an `Idempotency-Key` header, so a retry after a dropped connection returns the same order rather than placing another. The cart needs a phone number and a delivery address. Returns the order with its token, which is how the buyer reads the order back; like the cart token it is stored hashed. A mismatched `expectedTotalPaisa` is a conflict: re-read the cart and show the new total.","tags":["Storefront — Carts & Checkout"],"parameters":[{"name":"cartId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"expectedTotalPaisa":{"type":"number"},"note":{"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"acceptTerms":{"type":"boolean"},"whatsappUpdates":{"type":"boolean"}},"required":["token"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"type":"string"},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"checkCode":{"type":"string"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","startsAt","endsAt","staffName","status","quantity","checkCode","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineItemId":{"type":"string"},"quantity":{"type":"number"}},"required":["orderLineItemId","quantity"]}}},"required":["id","trackingUrl","status","courierName","trackingNumber","dispatchedAt","deliveredAt","lines"]}},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"token":{"type":"string"},"checkoutPayment":{"anyOf":[{"type":"object","properties":{"kind":{"const":"placed"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"redirect"},"url":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["kind","url","expiresAt"]},{"anyOf":[{"type":"object","properties":{"kind":{"const":"embedded"},"provider":{"const":"safepay"},"environment":{"enum":["sandbox","production"],"type":"string"},"tracker":{"type":"string"},"authToken":{"type":"string"},"customer":{"type":"string"},"url":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["kind","provider","environment","tracker","authToken","customer","url","expiresAt"]},{"type":"object","properties":{"kind":{"const":"embedded"},"provider":{"const":"stripe"},"mode":{"enum":["test","live"],"type":"string"},"publishableKey":{"type":"string"},"clientSecret":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["kind","provider","mode","publishableKey","clientSecret","expiresAt"]},{"type":"object","properties":{"kind":{"const":"embedded"},"provider":{"const":"alfalah"},"mode":{"enum":["test","live"],"type":"string"},"actionUrl":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["kind","provider","mode","actionUrl","fields","expiresAt"]}]},{"type":"object","properties":{"kind":{"const":"pending"}},"required":["kind"]}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","shipments","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","token","checkoutPayment"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/carts/recover":{"post":{"operationId":"storefront.carts.recover","summary":"Restore an abandoned checkout's items into a new cart","tags":["Storefront — Carts & Checkout"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["active","converted","abandoned","deleted"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"requiresShipping":{"type":"boolean"},"shippingRateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productId":{"type":"string"},"productSlug":{"type":"string"},"title":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPricePaisa":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"booking":{"anyOf":[{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"visitKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["startsAt","endsAt","staffId","staffName","visitKey"]},{"type":"null"}]},"participantsNeeded":{"type":"number"},"participants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"age":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","age"]}},"ages":{"anyOf":[{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["min","max"]},{"type":"null"}]}},"required":["id","variantId","productId","productSlug","title","variantTitle","imageUrl","quantity","unitPricePaisa","linePaisa","discountPaisa","sale","kind","booking","participantsNeeded","participants","ages"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"discountCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"applied":{"type":"boolean"},"reason":{"anyOf":[{"enum":["not_found","disabled","not_started","expired","minimum_not_met","not_eligible_customer","usage_limit_reached","already_used_by_customer","does_not_apply_to_items","does_not_apply_to_shipping","not_combinable","sale_not_combinable"],"type":"string"},{"type":"null"}]}},"required":["code","applied","reason"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentMethods":{"type":"array","items":{"type":"object","properties":{"id":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"label":{"type":"string"},"kind":{"enum":["offline","redirect"],"type":"string"},"testMode":{"type":"boolean"},"feePaisa":{"type":"number"},"unavailable":{"type":"boolean"},"unavailableReason":{"type":"string"}},"required":["id","label","kind","testMode","feePaisa"]}},"depositPaisa":{"type":"number"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"consent":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"accepted":{"type":"boolean"}},"required":["text","accepted"]},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"token":{"type":"string"}},"required":["id","status","email","phone","name","shippingAddress","billingAddress","requiresShipping","shippingRateId","lines","discounts","discountCodes","sales","totals","paymentMethod","paymentMethods","depositPaisa","advanceInstructions","consent","expiresAt","createdAt","updatedAt","token"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/orders/{orderId}/confirm":{"post":{"operationId":"storefront.orders.confirm","summary":"Confirm a COD order with a one-time confirmation token","tags":["Storefront — Orders"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"confirmed":{"const":true}},"required":["confirmed"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/orders/{orderId}":{"get":{"operationId":"storefront.orders.get","summary":"Get an order with its token","tags":["Storefront — Orders"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}},{"name":"token","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"type":"string"},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"checkCode":{"type":"string"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","startsAt","endsAt","staffName","status","quantity","checkCode","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineItemId":{"type":"string"},"quantity":{"type":"number"}},"required":["orderLineItemId","quantity"]}}},"required":["id","trackingUrl","status","courierName","trackingNumber","dispatchedAt","deliveredAt","lines"]}},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"canRequestReceipt":{"type":"boolean"},"receiptTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusToken":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","shipments","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","receiptTo","statusToken"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/orders/{orderId}/receipt":{"post":{"operationId":"storefront.orders.requestReceipt","summary":"Email a receipt using the checkout capability","tags":["Storefront — Orders"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"email":{"type":"string"}},"required":["token","email"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"queued":{"const":true}},"required":["queued"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/orders/{orderId}/bookings/{bookingId}/cancel":{"post":{"operationId":"storefront.orders.cancelBooking","summary":"Cancel a booking on an order","tags":["Storefront — Orders"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}},{"name":"bookingId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"type":"string"},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"checkCode":{"type":"string"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","startsAt","endsAt","staffName","status","quantity","checkCode","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineItemId":{"type":"string"},"quantity":{"type":"number"}},"required":["orderLineItemId","quantity"]}}},"required":["id","trackingUrl","status","courierName","trackingNumber","dispatchedAt","deliveredAt","lines"]}},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"canRequestReceipt":{"type":"boolean"},"receiptTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusToken":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","shipments","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","receiptTo","statusToken"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/orders/{orderId}/bookings/{bookingId}/reschedule":{"post":{"operationId":"storefront.orders.rescheduleBooking","summary":"Move a booking to another free time","description":"The new start must be free online now; the same person is kept when one was asked for.","tags":["Storefront — Orders"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}},{"name":"bookingId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["token","startsAt"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"type":"string"},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"checkCode":{"type":"string"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","startsAt","endsAt","staffName","status","quantity","checkCode","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineItemId":{"type":"string"},"quantity":{"type":"number"}},"required":["orderLineItemId","quantity"]}}},"required":["id","trackingUrl","status","courierName","trackingNumber","dispatchedAt","deliveredAt","lines"]}},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"canRequestReceipt":{"type":"boolean"},"receiptTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusToken":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","shipments","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","receiptTo","statusToken"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/orders/{orderId}/payment/status":{"post":{"operationId":"storefront.payments.status","summary":"Read (and refresh) an order's payment status","tags":["Storefront — Orders"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/orders/{orderId}/payment/retry":{"post":{"operationId":"storefront.payments.retry","summary":"Retry an order's online payment","description":"Requires an `Idempotency-Key` header. Refused once the order is paid, cancelled or past its payment deadline.","tags":["Storefront — Orders"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"kind":{"const":"placed"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"redirect"},"url":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["kind","url","expiresAt"]},{"anyOf":[{"type":"object","properties":{"kind":{"const":"embedded"},"provider":{"const":"safepay"},"environment":{"enum":["sandbox","production"],"type":"string"},"tracker":{"type":"string"},"authToken":{"type":"string"},"customer":{"type":"string"},"url":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["kind","provider","environment","tracker","authToken","customer","url","expiresAt"]},{"type":"object","properties":{"kind":{"const":"embedded"},"provider":{"const":"stripe"},"mode":{"enum":["test","live"],"type":"string"},"publishableKey":{"type":"string"},"clientSecret":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["kind","provider","mode","publishableKey","clientSecret","expiresAt"]},{"type":"object","properties":{"kind":{"const":"embedded"},"provider":{"const":"alfalah"},"mode":{"enum":["test","live"],"type":"string"},"actionUrl":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["kind","provider","mode","actionUrl","fields","expiresAt"]}]},{"type":"object","properties":{"kind":{"const":"pending"}},"required":["kind"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/orders/{orderId}/payment/switch-to-cod":{"post":{"operationId":"storefront.payments.switchToCod","summary":"Switch an unpaid online order to cash on delivery","tags":["Storefront — Orders"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"expectedTotalPaisa":{"type":"number"}},"required":["token","expectedTotalPaisa"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"type":"string"},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"checkCode":{"type":"string"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","startsAt","endsAt","staffName","status","quantity","checkCode","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineItemId":{"type":"string"},"quantity":{"type":"number"}},"required":["orderLineItemId","quantity"]}}},"required":["id","trackingUrl","status","courierName","trackingNumber","dispatchedAt","deliveredAt","lines"]}},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","shipments","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/pages":{"get":{"operationId":"storefront.pages.list","summary":"List published pages","description":"Links only, without bodies — for footers and sitemaps.","tags":["Storefront — Store & Site"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"handle":{"type":"string"},"title":{"type":"string"},"kind":{"enum":["page","contact","policy_refund","policy_shipping","policy_privacy","policy_terms"],"type":"string"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["handle","title","kind","updatedAt"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/pages/{handle}":{"get":{"operationId":"storefront.pages.get","summary":"Get a published page","tags":["Storefront — Store & Site"],"parameters":[{"name":"handle","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"kind":{"enum":["page","contact","policy_refund","policy_shipping","policy_privacy","policy_terms"],"type":"string"},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","handle","title","body","kind","seo","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/menus/{id}":{"get":{"operationId":"storefront.menus.get","summary":"Get a navigation menu","tags":["Storefront — Store & Site"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"href":{"anyOf":[{"type":"string"},{"type":"null"}]},"external":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"href":{"anyOf":[{"type":"string"},{"type":"null"}]},"external":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"href":{"anyOf":[{"type":"string"},{"type":"null"}]},"external":{"type":"boolean"},"children":{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}},"required":["id","label","href","external","children"],"additionalProperties":false}}},"required":["id","label","href","external","children"],"additionalProperties":false}}},"required":["id","label","href","external","children"],"additionalProperties":false}},"customized":{"type":"boolean"}},"required":["id","handle","items","customized"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/redirects/resolve":{"get":{"operationId":"storefront.redirects.resolve","summary":"Look up a redirect for a path","description":"Called when a path would otherwise 404. Answers NOT_FOUND when no redirect matches.","tags":["Storefront — Store & Site"],"parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"toPath":{"type":"string"},"statusCode":{"anyOf":[{"const":301},{"const":302}]}},"required":["toPath","statusCode"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/sitemap":{"get":{"operationId":"storefront.sitemap.list","summary":"List every indexable URL","description":"Published products, collections and pages with their last change, paged by cursor.","tags":["Storefront — Store & Site"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"number","default":5000},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"type":{"enum":["product","collection","page","blog"],"type":"string"},"handle":{"type":"string"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["type","handle","updatedAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/site/resolve":{"get":{"operationId":"storefront.site.resolve","summary":"Resolve a route from the live site","description":"Give a page type and, for products, collections, pages and posts, a handle or id. Answers NOT_FOUND when the store has not published its site or the resource does not exist.","tags":["Storefront — Store & Site"],"parameters":[{"name":"pageType","in":"query","required":true,"schema":{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"handle","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"id","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"release":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"}},"required":["id","number"]},{"type":"null"}]},"preview":{"type":"boolean"},"pageType":{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},"template":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]},{"type":"null"}]},"templateChoice":{"anyOf":[{"type":"object","properties":{"templateId":{"type":"string"},"source":{"const":"explicit"}},"required":["templateId","source"]},{"type":"object","properties":{"templateId":{"type":"string"},"source":{"const":"rule"},"ruleId":{"type":"string"}},"required":["templateId","source","ruleId"]},{"type":"object","properties":{"templateId":{"type":"string"},"source":{"const":"default"}},"required":["templateId","source"]},{"type":"object","properties":{"templateId":{"type":"null"},"source":{"const":"none"}},"required":["templateId","source"]}]},"page":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]},{"type":"null"}]},"layout":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]},{"type":"null"}]},"theme":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]},{"type":"null"}]},"code":{"anyOf":[{"type":"object","properties":{"css":{"type":"string"},"snippets":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["css","snippets"]},{"type":"null"}]},"customCode":{"enum":["on","paused","blocked","off"],"type":"string"},"components":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]}},"menus":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]}},"resource":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"const":"product"},"product":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}},"required":["kind","product"]},{"type":"object","properties":{"kind":{"const":"collection"},"collection":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","alt","width","height"]},{"type":"null"}]},"productsCount":{"type":"number"}},"required":["id","slug","title","description","url","image","productsCount"]}},"required":["kind","collection"]},{"type":"object","properties":{"kind":{"const":"page"},"id":{"type":"string"}},"required":["kind","id"]},{"type":"object","properties":{"kind":{"const":"article"},"article":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"meta":{"type":"object","properties":{"author":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"excerpt":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"coverImage":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"alt":{"type":"string"},"focal":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]},"decorative":{"type":"boolean"}},"required":["asset"],"additionalProperties":false},{"type":"null"}]}},"required":["author","publishedAt","tags"],"additionalProperties":false}},"required":["id","handle","title","url","meta"]}},"required":["kind","article"]}]},{"type":"null"}]},"context":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"object","properties":{"source":{"const":"products"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"product"},"item":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]},{"type":"null"}]}},"required":["source","item"]},{"type":"object","properties":{"source":{"const":"collections"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","alt","width","height"]},{"type":"null"}]},"productsCount":{"type":"number"}},"required":["id","slug","title","description","url","image","productsCount"]}}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"collection"},"item":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","alt","width","height"]},{"type":"null"}]},"productsCount":{"type":"number"}},"required":["id","slug","title","description","url","image","productsCount"]},{"type":"null"}]}},"required":["source","item"]},{"type":"object","properties":{"source":{"const":"articles"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"meta":{"type":"object","properties":{"author":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"excerpt":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"coverImage":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"alt":{"type":"string"},"focal":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]},"decorative":{"type":"boolean"}},"required":["asset"],"additionalProperties":false},{"type":"null"}]}},"required":["author","publishedAt","tags"],"additionalProperties":false}},"required":["id","handle","title","url","meta"]}}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"menu"},"item":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":"string"},"name":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"items":{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}},"required":["id","label","url","items"],"additionalProperties":{}}}},"required":["id","label","url","items"],"additionalProperties":{}}}},"required":["id","handle","name","items"]},{"type":"null"}]}},"required":["source","item"]},{"type":"object","properties":{"source":{"const":"reviews"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"productId":{"type":"string"},"displayName":{"type":"string"},"rating":{"type":"number"},"title":{"type":"string"},"body":{"type":"string"},"reply":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"product":{"anyOf":[{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"}},"required":["title","url"]},{"type":"null"}]},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"fit":{"anyOf":[{"enum":["small","true","large"],"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"}},"required":["id","url","width","height"]}}},"required":["id","productId","displayName","rating","title","body","reply","createdAt"]}},"summary":{"type":"object","properties":{"count":{"type":"number"},"average":{"anyOf":[{"type":"number"},{"type":"null"}]},"histogram":{"type":"array","items":{"type":"number"}},"fit":{"anyOf":[{"type":"object","properties":{"small":{"type":"number"},"true":{"type":"number"},"large":{"type":"number"}},"required":["small","true","large"]},{"type":"null"}]},"withPhotos":{"type":"number"}},"required":["count","average","histogram","fit","withPhotos"]},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"faqs"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"answer":{"type":"string"},"group":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","question","answer","group"],"additionalProperties":false}}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"booking"},"item":{"type":"object","properties":{"available":{"type":"boolean"},"timezone":{"type":"string"},"windowDays":{"type":"number"},"cancelWindowHours":{"type":"number"},"customerCanReschedule":{"type":"boolean"},"customerCanCancel":{"type":"boolean"},"policyText":{"type":"string"},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"number"},"opens":{"type":"string"},"closes":{"type":"string"}},"required":["weekday","opens","closes"]}},"specialDates":{"type":"array","items":{"type":"object","properties":{"startsOn":{"type":"string"},"endsOn":{"type":"string"},"closed":{"type":"boolean"},"opens":{"anyOf":[{"type":"string"},{"type":"null"}]},"closes":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"}},"required":["startsOn","endsOn","closed","opens","closes","label"]}},"staff":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"colourIndex":{"type":"number"},"photoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"productIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","title","colourIndex","photoUrl","productIds"]}},"services":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"staffChoice":{"enum":["choose","any_only","hidden"],"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"durationMin":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["variantId","durationMin"]}}},"required":["productId","staffChoice","variants"]}},"weekendDays":{"type":"array","items":{"type":"number"}},"sessions":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"minQuantity":{"type":"number"},"maxQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"asksParticipants":{"type":"boolean"},"tickets":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"takesPlace":{"type":"boolean"},"weekendPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"minAge":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxAge":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["variantId","takesPlace","weekendPricePaisa","minAge","maxAge"]}},"schedule":{"type":"array","items":{"type":"object","properties":{"weekdays":{"type":"array","items":{"type":"number"}},"startTimes":{"type":"array","items":{"type":"string"}},"durationMin":{"type":"number"}},"required":["weekdays","startTimes","durationMin"]}}},"required":["productId","minQuantity","maxQuantity","asksParticipants","tickets","schedule"]}},"packages":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"includedGuests":{"anyOf":[{"type":"number"},{"type":"null"}]},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"durationMin":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["variantId","durationMin"]}}},"required":["productId","includedGuests","variants"]}},"consentText":{"type":"string"}},"required":["available","timezone","windowDays","cancelWindowHours","customerCanReschedule","customerCanCancel","policyText","hours","specialDates","staff","services","weekendDays","sessions","packages","consentText"]}},"required":["source","item"]}]}},"media":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","alt","width","height"]}},"links":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"}},"required":["title","url"]}},"expressions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"errors":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"setting":{"type":"string"},"message":{"type":"string"}},"required":["address","setting","message"]}}},"required":["values","errors"]}}},"required":["release","preview","pageType","template","templateChoice","page","layout","theme","code","customCode","components","menus","resource","context","data","media","links","expressions"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/auth/otp/request":{"post":{"operationId":"storefront.account.requestOtp","summary":"Send a 6-digit sign-in verification code to a customer","tags":["Storefront — Customer Portal"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"enum":["email","whatsapp","sms"],"type":"string","default":"email"},"identifier":{"type":"string"}},"required":["identifier"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sent":{"const":true},"channel":{"enum":["email","whatsapp","sms"],"type":"string"},"maskedIdentifier":{"type":"string"},"expiresInSeconds":{"type":"number"},"cooldownSeconds":{"type":"number"}},"required":["sent","channel","maskedIdentifier","expiresInSeconds","cooldownSeconds"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/auth/otp/verify":{"post":{"operationId":"storefront.account.verifyOtp","summary":"Verify a 6-digit code and issue a store-scoped customer session","tags":["Storefront — Customer Portal"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"enum":["email","whatsapp","sms"],"type":"string","default":"email"},"identifier":{"type":"string"},"code":{"type":"string"}},"required":["identifier","code"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"customer":{"type":"object","properties":{"id":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"reviewRequestsOptedOut":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","email","phone","firstName","lastName","reviewRequestsOptedOut","createdAt"]}},"required":["token","expiresAt","customer"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/session":{"get":{"operationId":"storefront.account.session","summary":"Get the currently signed-in customer session","tags":["Storefront — Customer Portal"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"type":"object","properties":{"id":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"reviewRequestsOptedOut":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","email","phone","firstName","lastName","reviewRequestsOptedOut","createdAt"]},"sessionId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["customer","sessionId","expiresAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/auth/logout":{"post":{"operationId":"storefront.account.logout","summary":"Sign out the current customer session","tags":["Storefront — Customer Portal"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"signedOut":{"const":true}},"required":["signedOut"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/auth/logout-all":{"post":{"operationId":"storefront.account.logoutAll","summary":"Sign out every device for this customer on this store","tags":["Storefront — Customer Portal"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"keepCurrent":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"type":"number"}},"required":["revoked"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/sessions":{"get":{"operationId":"storefront.account.listSessions","summary":"List active sessions for the signed-in customer","tags":["Storefront — Customer Portal"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["email","whatsapp","sms"],"type":"string"},"identifier":{"type":"string"},"userAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSeenAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"current":{"type":"boolean"}},"required":["id","channel","identifier","userAgent","lastSeenAt","expiresAt","createdAt","current"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/sessions/{id}":{"delete":{"operationId":"storefront.account.revokeSession","summary":"Revoke one active customer session","tags":["Storefront — Customer Portal"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"const":true}},"required":["revoked"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/profile":{"get":{"operationId":"storefront.account.getProfile","summary":"Get the signed-in customer's profile","tags":["Storefront — Customer Portal"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"reviewRequestsOptedOut":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","email","phone","firstName","lastName","reviewRequestsOptedOut","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]},"patch":{"operationId":"storefront.account.updateProfile","summary":"Update the signed-in customer's name","tags":["Storefront — Customer Portal"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"reviewRequestsOptedOut":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","email","phone","firstName","lastName","reviewRequestsOptedOut","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/profile/contact/request-otp":{"post":{"operationId":"storefront.account.requestContactOtp","summary":"Send an OTP code to verify a new email address","tags":["Storefront — Customer Portal"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"enum":["email","whatsapp","sms"],"type":"string","default":"email"},"identifier":{"type":"string"}},"required":["identifier"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sent":{"const":true},"channel":{"enum":["email","whatsapp","sms"],"type":"string"},"maskedIdentifier":{"type":"string"},"expiresInSeconds":{"type":"number"},"cooldownSeconds":{"type":"number"}},"required":["sent","channel","maskedIdentifier","expiresInSeconds","cooldownSeconds"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/profile/contact/verify-otp":{"post":{"operationId":"storefront.account.verifyContactOtp","summary":"Confirm a contact-change OTP code and update the customer record","tags":["Storefront — Customer Portal"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"enum":["email","whatsapp","sms"],"type":"string","default":"email"},"identifier":{"type":"string"},"code":{"type":"string"}},"required":["identifier","code"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"reviewRequestsOptedOut":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","email","phone","firstName","lastName","reviewRequestsOptedOut","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/addresses":{"get":{"operationId":"storefront.account.listAddresses","summary":"List the signed-in customer's saved delivery addresses","tags":["Storefront — Customer Portal"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"},"isDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","line1","line2","city","province","postalCode","landmark","country","recipientName","recipientPhone","isDefault","createdAt"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]},"post":{"operationId":"storefront.account.createAddress","summary":"Add a saved delivery address","tags":["Storefront — Customer Portal"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string","default":""},"postalCode":{"type":"string","default":""},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string","default":"PK"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"},"isDefault":{"type":"boolean","default":false}},"required":["line1","city","recipientName","recipientPhone"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"},"isDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","line1","line2","city","province","postalCode","landmark","country","recipientName","recipientPhone","isDefault","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/addresses/{addressId}":{"patch":{"operationId":"storefront.account.updateAddress","summary":"Update a saved delivery address","tags":["Storefront — Customer Portal"],"parameters":[{"name":"addressId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"},"isDefault":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"},"isDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","line1","line2","city","province","postalCode","landmark","country","recipientName","recipientPhone","isDefault","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]},"delete":{"operationId":"storefront.account.deleteAddress","summary":"Remove a saved delivery address","tags":["Storefront — Customer Portal"],"parameters":[{"name":"addressId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"const":true}},"required":["deleted"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/addresses/{addressId}/default":{"post":{"operationId":"storefront.account.setDefaultAddress","summary":"Set one saved address as the default delivery address","tags":["Storefront — Customer Portal"],"parameters":[{"name":"addressId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"},"isDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","line1","line2","city","province","postalCode","landmark","country","recipientName","recipientPhone","isDefault","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/preferences":{"get":{"operationId":"storefront.account.getPreferences","summary":"Get unified email, WhatsApp, SMS and review preferences","tags":["Storefront — Customer Portal"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"object","properties":{"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"marketing":{"enum":["never","subscribed","unsubscribed"],"type":"string"}},"required":["address","marketing"]},"whatsapp":{"type":"object","properties":{"available":{"type":"boolean"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"transactional":{"enum":["none","allowed","blocked"],"type":"string"},"marketing":{"enum":["never","subscribed","unsubscribed"],"type":"string"}},"required":["available","phone","transactional","marketing"]},"sms":{"type":"object","properties":{"available":{"type":"boolean"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"marketing":{"enum":["never","subscribed","unsubscribed"],"type":"string"}},"required":["available","phone","marketing"]},"reviewRequests":{"type":"object","properties":{"optedOut":{"type":"boolean"}},"required":["optedOut"]}},"required":["email","whatsapp","sms","reviewRequests"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]},"put":{"operationId":"storefront.account.updatePreferences","summary":"Update communication and review request preferences","tags":["Storefront — Customer Portal"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emailMarketing":{"type":"boolean"},"whatsappTransactional":{"type":"boolean"},"whatsappMarketing":{"type":"boolean"},"smsMarketing":{"type":"boolean"},"reviewRequestsOptOut":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"object","properties":{"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"marketing":{"enum":["never","subscribed","unsubscribed"],"type":"string"}},"required":["address","marketing"]},"whatsapp":{"type":"object","properties":{"available":{"type":"boolean"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"transactional":{"enum":["none","allowed","blocked"],"type":"string"},"marketing":{"enum":["never","subscribed","unsubscribed"],"type":"string"}},"required":["available","phone","transactional","marketing"]},"sms":{"type":"object","properties":{"available":{"type":"boolean"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"marketing":{"enum":["never","subscribed","unsubscribed"],"type":"string"}},"required":["available","phone","marketing"]},"reviewRequests":{"type":"object","properties":{"optedOut":{"type":"boolean"}},"required":["optedOut"]}},"required":["email","whatsapp","sms","reviewRequests"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/back-in-stock":{"get":{"operationId":"storefront.account.listBackInStock","summary":"List active back-in-stock alerts for the signed-in customer","tags":["Storefront — Customer Portal"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"productId":{"type":"string"},"productTitle":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"variantId":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","productId","productTitle","productHandle","variantId","variantTitle","createdAt"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/back-in-stock/{id}":{"delete":{"operationId":"storefront.account.deleteBackInStock","summary":"Cancel a back-in-stock alert","tags":["Storefront — Customer Portal"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"unsubscribed":{"const":true}},"required":["unsubscribed"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/orders":{"get":{"operationId":"storefront.account.listOrders","summary":"List orders placed by the signed-in customer","tags":["Storefront — Customer Portal"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"type":"string"},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"checkCode":{"type":"string"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","startsAt","endsAt","staffName","status","quantity","checkCode","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineItemId":{"type":"string"},"quantity":{"type":"number"}},"required":["orderLineItemId","quantity"]}}},"required":["id","trackingUrl","status","courierName","trackingNumber","dispatchedAt","deliveredAt","lines"]}},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","shipments","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/orders/{orderId}":{"get":{"operationId":"storefront.account.getOrder","summary":"Get one customer order with computed self-serve allowedActions","tags":["Storefront — Customer Portal"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"type":"string"},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"checkCode":{"type":"string"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","startsAt","endsAt","staffName","status","quantity","checkCode","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineItemId":{"type":"string"},"quantity":{"type":"number"}},"required":["orderLineItemId","quantity"]}}},"required":["id","trackingUrl","status","courierName","trackingNumber","dispatchedAt","deliveredAt","lines"]}},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"allowedActions":{"type":"object","properties":{"canConfirmCod":{"type":"boolean"},"canEditDelivery":{"type":"boolean"},"canChangeCityProvince":{"type":"boolean"},"canEditNote":{"type":"boolean"},"canCancel":{"type":"boolean"},"canSwapVariant":{"type":"boolean"},"canEditItems":{"type":"boolean"},"canReorder":{"type":"boolean"},"deliveryEditUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"itemEditUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["canConfirmCod","canEditDelivery","canChangeCityProvince","canEditNote","canCancel","canSwapVariant","canEditItems","canReorder","deliveryEditUntil","cancelUntil","itemEditUntil"]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","shipments","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","allowedActions"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/orders/{orderId}/bookings/{bookingId}/cancel":{"post":{"operationId":"storefront.account.cancelBooking","summary":"Cancel a booking on one of the customer's orders","tags":["Storefront — Customer Portal"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}},{"name":"bookingId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"type":"string"},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"checkCode":{"type":"string"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","startsAt","endsAt","staffName","status","quantity","checkCode","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineItemId":{"type":"string"},"quantity":{"type":"number"}},"required":["orderLineItemId","quantity"]}}},"required":["id","trackingUrl","status","courierName","trackingNumber","dispatchedAt","deliveredAt","lines"]}},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"allowedActions":{"type":"object","properties":{"canConfirmCod":{"type":"boolean"},"canEditDelivery":{"type":"boolean"},"canChangeCityProvince":{"type":"boolean"},"canEditNote":{"type":"boolean"},"canCancel":{"type":"boolean"},"canSwapVariant":{"type":"boolean"},"canEditItems":{"type":"boolean"},"canReorder":{"type":"boolean"},"deliveryEditUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"itemEditUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["canConfirmCod","canEditDelivery","canChangeCityProvince","canEditNote","canCancel","canSwapVariant","canEditItems","canReorder","deliveryEditUntil","cancelUntil","itemEditUntil"]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","shipments","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","allowedActions"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/orders/{orderId}/bookings/{bookingId}/reschedule":{"post":{"operationId":"storefront.account.rescheduleBooking","summary":"Reschedule a booking on one of the customer's orders","tags":["Storefront — Customer Portal"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}},{"name":"bookingId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["startsAt"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"type":"string"},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"checkCode":{"type":"string"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","startsAt","endsAt","staffName","status","quantity","checkCode","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineItemId":{"type":"string"},"quantity":{"type":"number"}},"required":["orderLineItemId","quantity"]}}},"required":["id","trackingUrl","status","courierName","trackingNumber","dispatchedAt","deliveredAt","lines"]}},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"allowedActions":{"type":"object","properties":{"canConfirmCod":{"type":"boolean"},"canEditDelivery":{"type":"boolean"},"canChangeCityProvince":{"type":"boolean"},"canEditNote":{"type":"boolean"},"canCancel":{"type":"boolean"},"canSwapVariant":{"type":"boolean"},"canEditItems":{"type":"boolean"},"canReorder":{"type":"boolean"},"deliveryEditUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"itemEditUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["canConfirmCod","canEditDelivery","canChangeCityProvince","canEditNote","canCancel","canSwapVariant","canEditItems","canReorder","deliveryEditUntil","cancelUntil","itemEditUntil"]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","shipments","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","allowedActions"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/orders/{orderId}/confirm":{"post":{"operationId":"storefront.account.confirmOrder","summary":"Self-confirm a pending cash-on-delivery order","tags":["Storefront — Customer Portal"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"type":"string"},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"checkCode":{"type":"string"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","startsAt","endsAt","staffName","status","quantity","checkCode","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineItemId":{"type":"string"},"quantity":{"type":"number"}},"required":["orderLineItemId","quantity"]}}},"required":["id","trackingUrl","status","courierName","trackingNumber","dispatchedAt","deliveredAt","lines"]}},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"allowedActions":{"type":"object","properties":{"canConfirmCod":{"type":"boolean"},"canEditDelivery":{"type":"boolean"},"canChangeCityProvince":{"type":"boolean"},"canEditNote":{"type":"boolean"},"canCancel":{"type":"boolean"},"canSwapVariant":{"type":"boolean"},"canEditItems":{"type":"boolean"},"canReorder":{"type":"boolean"},"deliveryEditUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"itemEditUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["canConfirmCod","canEditDelivery","canChangeCityProvince","canEditNote","canCancel","canSwapVariant","canEditItems","canReorder","deliveryEditUntil","cancelUntil","itemEditUntil"]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","shipments","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","allowedActions"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/orders/{orderId}/delivery":{"patch":{"operationId":"storefront.account.updateOrderDelivery","summary":"Edit delivery details on an eligible unshipped order","tags":["Storefront — Customer Portal"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string","default":""},"postalCode":{"type":"string","default":""},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string","default":"PK"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["phone","recipientName","recipientPhone","line1","city"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"type":"string"},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"checkCode":{"type":"string"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","startsAt","endsAt","staffName","status","quantity","checkCode","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineItemId":{"type":"string"},"quantity":{"type":"number"}},"required":["orderLineItemId","quantity"]}}},"required":["id","trackingUrl","status","courierName","trackingNumber","dispatchedAt","deliveredAt","lines"]}},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"allowedActions":{"type":"object","properties":{"canConfirmCod":{"type":"boolean"},"canEditDelivery":{"type":"boolean"},"canChangeCityProvince":{"type":"boolean"},"canEditNote":{"type":"boolean"},"canCancel":{"type":"boolean"},"canSwapVariant":{"type":"boolean"},"canEditItems":{"type":"boolean"},"canReorder":{"type":"boolean"},"deliveryEditUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"itemEditUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["canConfirmCod","canEditDelivery","canChangeCityProvince","canEditNote","canCancel","canSwapVariant","canEditItems","canReorder","deliveryEditUntil","cancelUntil","itemEditUntil"]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","shipments","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","allowedActions"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/orders/{orderId}/note":{"patch":{"operationId":"storefront.account.updateOrderNote","summary":"Edit the delivery note on an unshipped order","tags":["Storefront — Customer Portal"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["note"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"type":"string"},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"checkCode":{"type":"string"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","startsAt","endsAt","staffName","status","quantity","checkCode","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineItemId":{"type":"string"},"quantity":{"type":"number"}},"required":["orderLineItemId","quantity"]}}},"required":["id","trackingUrl","status","courierName","trackingNumber","dispatchedAt","deliveredAt","lines"]}},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"allowedActions":{"type":"object","properties":{"canConfirmCod":{"type":"boolean"},"canEditDelivery":{"type":"boolean"},"canChangeCityProvince":{"type":"boolean"},"canEditNote":{"type":"boolean"},"canCancel":{"type":"boolean"},"canSwapVariant":{"type":"boolean"},"canEditItems":{"type":"boolean"},"canReorder":{"type":"boolean"},"deliveryEditUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"itemEditUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["canConfirmCod","canEditDelivery","canChangeCityProvince","canEditNote","canCancel","canSwapVariant","canEditItems","canReorder","deliveryEditUntil","cancelUntil","itemEditUntil"]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","shipments","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","allowedActions"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/orders/{orderId}/cancel":{"post":{"operationId":"storefront.account.cancelOrder","summary":"Cancel an eligible unshipped order without incrementing buyer risk","tags":["Storefront — Customer Portal"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"type":"string"},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"checkCode":{"type":"string"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","startsAt","endsAt","staffName","status","quantity","checkCode","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineItemId":{"type":"string"},"quantity":{"type":"number"}},"required":["orderLineItemId","quantity"]}}},"required":["id","trackingUrl","status","courierName","trackingNumber","dispatchedAt","deliveredAt","lines"]}},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"allowedActions":{"type":"object","properties":{"canConfirmCod":{"type":"boolean"},"canEditDelivery":{"type":"boolean"},"canChangeCityProvince":{"type":"boolean"},"canEditNote":{"type":"boolean"},"canCancel":{"type":"boolean"},"canSwapVariant":{"type":"boolean"},"canEditItems":{"type":"boolean"},"canReorder":{"type":"boolean"},"deliveryEditUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"itemEditUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["canConfirmCod","canEditDelivery","canChangeCityProvince","canEditNote","canCancel","canSwapVariant","canEditItems","canReorder","deliveryEditUntil","cancelUntil","itemEditUntil"]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","shipments","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","allowedActions"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/orders/{orderId}/reorder":{"post":{"operationId":"storefront.account.reorderOrder","summary":"Create a new cart prefilled with available items from a past order","tags":["Storefront — Customer Portal"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"cartId":{"type":"string"},"token":{"type":"string"},"addedCount":{"type":"number"},"unavailable":{"type":"array","items":{"type":"string"}}},"required":["cartId","token","addedCount","unavailable"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/orders/{orderId}/lines/{lineId}/swap-options":{"get":{"operationId":"storefront.account.orderLineSwapOptions","summary":"List same-price active variants available for swapping an order line","tags":["Storefront — Customer Portal"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}},{"name":"lineId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"pricePaisa":{"type":"number"},"available":{"type":"boolean"}},"required":["variantId","title","sku","pricePaisa","available"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/orders/{orderId}/lines/{lineId}/swap-variant":{"post":{"operationId":"storefront.account.swapOrderVariant","summary":"Swap an unshipped line item to a same-price variant of the same product","tags":["Storefront — Customer Portal"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}},{"name":"lineId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newVariantId":{"type":"string"}},"required":["newVariantId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"type":"string"},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"checkCode":{"type":"string"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","startsAt","endsAt","staffName","status","quantity","checkCode","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineItemId":{"type":"string"},"quantity":{"type":"number"}},"required":["orderLineItemId","quantity"]}}},"required":["id","trackingUrl","status","courierName","trackingNumber","dispatchedAt","deliveredAt","lines"]}},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"allowedActions":{"type":"object","properties":{"canConfirmCod":{"type":"boolean"},"canEditDelivery":{"type":"boolean"},"canChangeCityProvince":{"type":"boolean"},"canEditNote":{"type":"boolean"},"canCancel":{"type":"boolean"},"canSwapVariant":{"type":"boolean"},"canEditItems":{"type":"boolean"},"canReorder":{"type":"boolean"},"deliveryEditUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"itemEditUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["canConfirmCod","canEditDelivery","canChangeCityProvince","canEditNote","canCancel","canSwapVariant","canEditItems","canReorder","deliveryEditUntil","cancelUntil","itemEditUntil"]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","shipments","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","allowedActions"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/storefront/v1/account/orders/{orderId}/edit-items":{"post":{"operationId":"storefront.account.editOrderItems","summary":"Edit line items and quantities on an unconfirmed COD order","tags":["Storefront — Customer Portal"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"quantity":{"type":"number"}},"required":["variantId","quantity"]}}},"required":["lines"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"type":"string"},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"checkCode":{"type":"string"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","startsAt","endsAt","staffName","status","quantity","checkCode","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineItemId":{"type":"string"},"quantity":{"type":"number"}},"required":["orderLineItemId","quantity"]}}},"required":["id","trackingUrl","status","courierName","trackingNumber","dispatchedAt","deliveredAt","lines"]}},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"allowedActions":{"type":"object","properties":{"canConfirmCod":{"type":"boolean"},"canEditDelivery":{"type":"boolean"},"canChangeCityProvince":{"type":"boolean"},"canEditNote":{"type":"boolean"},"canCancel":{"type":"boolean"},"canSwapVariant":{"type":"boolean"},"canEditItems":{"type":"boolean"},"canReorder":{"type":"boolean"},"deliveryEditUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"itemEditUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["canConfirmCod","canEditDelivery","canChangeCityProvince","canEditNote","canCancel","canSwapVariant","canEditItems","canReorder","deliveryEditUntil","cancelUntil","itemEditUntil"]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","shipments","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","allowedActions"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"publishableKey":[]}]}},"/admin/v1/dashboard":{"get":{"operationId":"admin.dashboard.home","summary":"Sales overview and recent orders for the current store","description":"Calendar days in the store timezone, including today. Compared with the preceding equal number of calendar days. Excludes cancelled and test orders. Sales are order totals less refunds; cash to collect is unpaid COD on orders placed in the period. Today's values are partial. Recent orders are the eight newest, whatever the period. Attention is the delivery work open now: parcels by what they wait for, courier cash overdue, open claims, and why order emails are going unsent when no email app can send them. Setup lists the tasks the merchant's start answers asked for (payments, counter, appointments, delivery, domain) until the store is live.","tags":["Admin — Store & Settings"],"parameters":[{"name":"period","in":"query","schema":{"enum":["today","7d","30d"],"type":"string","default":"30d"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"enum":["today","7d","30d"],"type":"string"},"timezone":{"type":"string"},"current":{"type":"object","properties":{"sales":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"enum":["PKR"],"type":"string"}},"required":["amount","currency"]},"orders":{"type":"number"},"averageOrder":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"enum":["PKR"],"type":"string"}},"required":["amount","currency"]},"cashToCollect":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"enum":["PKR"],"type":"string"}},"required":["amount","currency"]}},"required":["sales","orders","averageOrder","cashToCollect"]},"previous":{"type":"object","properties":{"sales":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"enum":["PKR"],"type":"string"}},"required":["amount","currency"]},"orders":{"type":"number"},"averageOrder":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"enum":["PKR"],"type":"string"}},"required":["amount","currency"]},"cashToCollect":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"enum":["PKR"],"type":"string"}},"required":["amount","currency"]}},"required":["sales","orders","averageOrder","cashToCollect"]},"dailySales":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"sales":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"enum":["PKR"],"type":"string"}},"required":["amount","currency"]}},"required":["date","sales"]}},"recentOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}},"attention":{"type":"object","properties":{"parcels":{"type":"object","properties":{"packed":{"type":"number"},"withCourier":{"type":"number"},"needsAttention":{"type":"number"},"needsAnswer":{"type":"number"}},"required":["packed","withCourier","needsAttention","needsAnswer"]},"overdueCash":{"type":"object","properties":{"parcels":{"type":"number"},"amount":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"enum":["PKR"],"type":"string"}},"required":["amount","currency"]}},"required":["parcels","amount"]},"openClaims":{"type":"number"},"orderEmailsBlocked":{"anyOf":[{"enum":["not_configured","disabled","paused"],"type":"string"},{"type":"null"}]}},"required":["parcels","overdueCash","openClaims","orderEmailsBlocked"]},"setup":{"anyOf":[{"type":"object","properties":{"preferences":{"type":"object","properties":{"channels":{"type":"array","items":{"enum":["online","counter","appointments"],"type":"string"}},"payments":{"type":"array","items":{"enum":["cod","safepay","stripe","alfalah"],"type":"string"}},"delivery":{"type":"array","items":{"enum":["own_riders","couriers"],"type":"string"}}},"required":["channels","payments","delivery"]},"items":{"type":"array","items":{"type":"object","properties":{"key":{"enum":["payments","counter","appointments","delivery","domain"],"type":"string"},"done":{"type":"boolean"},"href":{"type":"string"}},"required":["key","done","href"]}}},"required":["preferences","items"]},{"type":"null"}]}},"required":["period","timezone","current","previous","dailySales","recentOrders","attention","setup"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/delivery-services":{"get":{"operationId":"admin.deliveryServices.list","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"type","in":"query","schema":{"enum":["own_delivery","offline_courier"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"enum":["own_delivery","offline_courier"],"type":"string"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["name","type","phone","website","instructions","id","createdAt","updatedAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"post":{"operationId":"admin.deliveryServices.create","tags":["Admin — Fulfillments & Shipping"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"type":{"enum":["own_delivery","offline_courier"],"type":"string"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","type","phone","website","instructions"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"type":{"enum":["own_delivery","offline_courier"],"type":"string"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["name","type","phone","website","instructions","id","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/delivery-services/choices":{"get":{"operationId":"admin.deliveryServices.choices","summary":"Active delivery services for a picker","description":"Every active delivery service's id, name and instructions, alphabetical. Bounded at 500.","tags":["Admin — Fulfillments & Shipping"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","instructions"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/delivery-services/{id}":{"get":{"operationId":"admin.deliveryServices.get","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"type":{"enum":["own_delivery","offline_courier"],"type":"string"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["name","type","phone","website","instructions","id","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"put":{"operationId":"admin.deliveryServices.update","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"type":{"enum":["own_delivery","offline_courier"],"type":"string"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","type","phone","website","instructions"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"type":{"enum":["own_delivery","offline_courier"],"type":"string"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["name","type","phone","website","instructions","id","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.deliveryServices.remove","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"const":true}},"required":["updated"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/faqs":{"get":{"operationId":"admin.faqs.list","description":"Every live FAQ in display order (at most 200 per store).","tags":["Admin — Content & Reviews"],"parameters":[{"name":"status","in":"query","schema":{"enum":["draft","active"],"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"},"group":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active"],"type":"string"},"id":{"type":"string"},"position":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["question","answer","group","status","id","position","createdAt","updatedAt"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"post":{"operationId":"admin.faqs.create","description":"Adds a question at the end of the list.","tags":["Admin — Content & Reviews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"},"group":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active"],"type":"string"}},"required":["question","answer","group","status"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"},"group":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active"],"type":"string"},"id":{"type":"string"},"position":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["question","answer","group","status","id","position","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/faqs/{id}":{"get":{"operationId":"admin.faqs.get","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"},"group":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active"],"type":"string"},"id":{"type":"string"},"position":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["question","answer","group","status","id","position","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"put":{"operationId":"admin.faqs.update","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"},"group":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active"],"type":"string"}},"required":["question","answer","group","status"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"},"group":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active"],"type":"string"},"id":{"type":"string"},"position":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["question","answer","group","status","id","position","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.faqs.remove","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"const":true}},"required":["updated"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/faqs/reorder":{"post":{"operationId":"admin.faqs.reorder","description":"Sets the display order. `ids` must list every live FAQ exactly once.","tags":["Admin — Content & Reviews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"},"group":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active"],"type":"string"},"id":{"type":"string"},"position":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["question","answer","group","status","id","position","createdAt","updatedAt"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/entitlements":{"get":{"operationId":"admin.bookingSetup.entitlements","summary":"What the store's plan includes for bookings","tags":["Admin — Bookings & Enquiries"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"bookings":{"type":"boolean"},"bookingSessions":{"type":"boolean"},"bookableStaff":{"anyOf":[{"type":"number"},{"type":"null"}]},"activeStaff":{"type":"number"},"addonAvailable":{"type":"boolean"},"addon":{"type":"boolean"},"extraStaff":{"type":"number"}},"required":["bookings","bookingSessions","bookableStaff","activeStaff","addonAvailable","addon","extraStaff"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/settings":{"get":{"operationId":"admin.bookingSetup.settings.get","summary":"Get the store's booking settings","tags":["Admin — Bookings & Enquiries"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"slotStepMin":{"anyOf":[{"const":15},{"const":30}]},"leadTimeMin":{"type":"number"},"windowDays":{"type":"number"},"doorHoldMinutes":{"type":"number"},"cancelWindowHours":{"type":"number"},"customerCanReschedule":{"type":"boolean"},"customerCanCancel":{"type":"boolean"},"policyText":{"type":"string"},"depositKind":{"enum":["none","fixed","percent","full"],"type":"string"},"depositValue":{"type":"number"},"advanceEnabled":{"type":"boolean"},"advanceInstructions":{"type":"string"},"advanceDeadlineHours":{"anyOf":[{"type":"number"},{"type":"null"}]},"womenOnly":{"type":"boolean"},"weekendDays":{"type":"array","items":{"type":"number"}},"reminderOffsetsMin":{"type":"array","items":{"type":"number"}},"emailsOff":{"type":"array","items":{"enum":["booking_confirmed","booking_advance_needed","booking_reminder","booking_rescheduled","booking_cancelled"],"type":"string"}},"servicesTaxRateBps":{"anyOf":[{"type":"number"},{"type":"null"}]},"consentText":{"type":"string"},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"number"},"opens":{"type":"string"},"closes":{"type":"string"}},"required":["weekday","opens","closes"]}},"overrides":{"type":"array","items":{"type":"object","properties":{"startsOn":{"type":"string"},"endsOn":{"type":"string"},"closed":{"type":"boolean"},"opens":{"anyOf":[{"type":"string"},{"type":"null"}]},"closes":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"}},"required":["startsOn","endsOn","closed","opens","closes","label"]}},"consentTextReviewed":{"type":"boolean"},"version":{"type":"number"}},"required":["enabled","slotStepMin","leadTimeMin","windowDays","doorHoldMinutes","cancelWindowHours","customerCanReschedule","customerCanCancel","policyText","depositKind","depositValue","advanceEnabled","advanceInstructions","advanceDeadlineHours","womenOnly","weekendDays","reminderOffsetsMin","emailsOff","servicesTaxRateBps","consentText","hours","overrides","consentTextReviewed","version"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"patch":{"operationId":"admin.bookingSetup.settings.update","summary":"Update the store's booking settings","description":"Omitted keys keep their value; hours and special dates, when sent, replace the stored ones. `version` must match the stored version (409 `stale_version` otherwise).","tags":["Admin — Bookings & Enquiries"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"slotStepMin":{"anyOf":[{"const":15},{"const":30}]},"leadTimeMin":{"type":"number"},"windowDays":{"type":"number"},"doorHoldMinutes":{"type":"number"},"cancelWindowHours":{"type":"number"},"customerCanReschedule":{"type":"boolean"},"customerCanCancel":{"type":"boolean"},"policyText":{"type":"string"},"depositKind":{"enum":["none","fixed","percent","full"],"type":"string"},"depositValue":{"type":"number"},"advanceEnabled":{"type":"boolean"},"advanceInstructions":{"type":"string"},"advanceDeadlineHours":{"anyOf":[{"type":"number"},{"type":"null"}]},"womenOnly":{"type":"boolean"},"weekendDays":{"type":"array","items":{"type":"number"}},"reminderOffsetsMin":{"type":"array","items":{"type":"number"}},"emailsOff":{"type":"array","items":{"enum":["booking_confirmed","booking_advance_needed","booking_reminder","booking_rescheduled","booking_cancelled"],"type":"string"}},"servicesTaxRateBps":{"anyOf":[{"type":"number"},{"type":"null"}]},"consentText":{"type":"string"},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"number"},"opens":{"type":"string"},"closes":{"type":"string"}},"required":["weekday","opens","closes"]}},"overrides":{"type":"array","items":{"type":"object","properties":{"startsOn":{"type":"string"},"endsOn":{"type":"string"},"closed":{"type":"boolean"},"opens":{"anyOf":[{"type":"string"},{"type":"null"}]},"closes":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"}},"required":["startsOn","endsOn","closed","opens","closes","label"]}},"version":{"type":"number"}},"required":["version"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"slotStepMin":{"anyOf":[{"const":15},{"const":30}]},"leadTimeMin":{"type":"number"},"windowDays":{"type":"number"},"doorHoldMinutes":{"type":"number"},"cancelWindowHours":{"type":"number"},"customerCanReschedule":{"type":"boolean"},"customerCanCancel":{"type":"boolean"},"policyText":{"type":"string"},"depositKind":{"enum":["none","fixed","percent","full"],"type":"string"},"depositValue":{"type":"number"},"advanceEnabled":{"type":"boolean"},"advanceInstructions":{"type":"string"},"advanceDeadlineHours":{"anyOf":[{"type":"number"},{"type":"null"}]},"womenOnly":{"type":"boolean"},"weekendDays":{"type":"array","items":{"type":"number"}},"reminderOffsetsMin":{"type":"array","items":{"type":"number"}},"emailsOff":{"type":"array","items":{"enum":["booking_confirmed","booking_advance_needed","booking_reminder","booking_rescheduled","booking_cancelled"],"type":"string"}},"servicesTaxRateBps":{"anyOf":[{"type":"number"},{"type":"null"}]},"consentText":{"type":"string"},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"number"},"opens":{"type":"string"},"closes":{"type":"string"}},"required":["weekday","opens","closes"]}},"overrides":{"type":"array","items":{"type":"object","properties":{"startsOn":{"type":"string"},"endsOn":{"type":"string"},"closed":{"type":"boolean"},"opens":{"anyOf":[{"type":"string"},{"type":"null"}]},"closes":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"}},"required":["startsOn","endsOn","closed","opens","closes","label"]}},"consentTextReviewed":{"type":"boolean"},"version":{"type":"number"}},"required":["enabled","slotStepMin","leadTimeMin","windowDays","doorHoldMinutes","cancelWindowHours","customerCanReschedule","customerCanCancel","policyText","depositKind","depositValue","advanceEnabled","advanceInstructions","advanceDeadlineHours","womenOnly","weekendDays","reminderOffsetsMin","emailsOff","servicesTaxRateBps","consentText","hours","overrides","consentTextReviewed","version"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/staff":{"get":{"operationId":"admin.bookingSetup.staff.list","summary":"List bookable staff","tags":["Admin — Bookings & Enquiries"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"enum":["female","male","unspecified"],"type":"string"},"mediaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"showPhoto":{"type":"boolean"},"bookableOnline":{"type":"boolean"},"colourIndex":{"type":"number"},"status":{"enum":["active","inactive"],"type":"string"},"productIds":{"type":"array","items":{"type":"string"}},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"number"},"starts":{"type":"string"},"ends":{"type":"string"},"kind":{"enum":["work","break"],"type":"string"}},"required":["weekday","starts","ends","kind"]}},"dates":{"type":"array","items":{"type":"object","properties":{"onDate":{"type":"string"},"kind":{"enum":["work","off"],"type":"string"},"starts":{"anyOf":[{"type":"string"},{"type":"null"}]},"ends":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["onDate","kind","starts","ends","note"]}},"timeOff":{"type":"array","items":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["startsAt","endsAt","reason"]}},"position":{"type":"number"},"offeredOnline":{"type":"boolean"},"version":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","displayName","title","gender","mediaId","showPhoto","bookableOnline","colourIndex","status","productIds","hours","dates","timeOff","position","offeredOnline","version","createdAt","updatedAt"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"post":{"operationId":"admin.bookingSetup.staff.create","summary":"Add a staff profile","tags":["Admin — Bookings & Enquiries"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"gender":{"enum":["female","male","unspecified"],"type":"string","default":"unspecified"},"mediaId":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"showPhoto":{"type":"boolean","default":false},"bookableOnline":{"type":"boolean","default":true},"colourIndex":{"type":"number","default":0},"status":{"enum":["active","inactive"],"type":"string","default":"active"},"productIds":{"type":"array","items":{"type":"string"},"default":[]},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"number"},"starts":{"type":"string"},"ends":{"type":"string"},"kind":{"enum":["work","break"],"type":"string"}},"required":["weekday","starts","ends","kind"]},"default":[]},"dates":{"type":"array","items":{"type":"object","properties":{"onDate":{"type":"string"},"kind":{"enum":["work","off"],"type":"string"},"starts":{"anyOf":[{"type":"string"},{"type":"null"}]},"ends":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["onDate","kind","starts","ends","note"]},"default":[]},"timeOff":{"type":"array","items":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["startsAt","endsAt","reason"]},"default":[]}},"required":["displayName"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"enum":["female","male","unspecified"],"type":"string"},"mediaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"showPhoto":{"type":"boolean"},"bookableOnline":{"type":"boolean"},"colourIndex":{"type":"number"},"status":{"enum":["active","inactive"],"type":"string"},"productIds":{"type":"array","items":{"type":"string"}},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"number"},"starts":{"type":"string"},"ends":{"type":"string"},"kind":{"enum":["work","break"],"type":"string"}},"required":["weekday","starts","ends","kind"]}},"dates":{"type":"array","items":{"type":"object","properties":{"onDate":{"type":"string"},"kind":{"enum":["work","off"],"type":"string"},"starts":{"anyOf":[{"type":"string"},{"type":"null"}]},"ends":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["onDate","kind","starts","ends","note"]}},"timeOff":{"type":"array","items":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["startsAt","endsAt","reason"]}},"position":{"type":"number"},"offeredOnline":{"type":"boolean"},"version":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","displayName","title","gender","mediaId","showPhoto","bookableOnline","colourIndex","status","productIds","hours","dates","timeOff","position","offeredOnline","version","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/staff/{id}":{"get":{"operationId":"admin.bookingSetup.staff.get","summary":"Get a staff profile","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"enum":["female","male","unspecified"],"type":"string"},"mediaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"showPhoto":{"type":"boolean"},"bookableOnline":{"type":"boolean"},"colourIndex":{"type":"number"},"status":{"enum":["active","inactive"],"type":"string"},"productIds":{"type":"array","items":{"type":"string"}},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"number"},"starts":{"type":"string"},"ends":{"type":"string"},"kind":{"enum":["work","break"],"type":"string"}},"required":["weekday","starts","ends","kind"]}},"dates":{"type":"array","items":{"type":"object","properties":{"onDate":{"type":"string"},"kind":{"enum":["work","off"],"type":"string"},"starts":{"anyOf":[{"type":"string"},{"type":"null"}]},"ends":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["onDate","kind","starts","ends","note"]}},"timeOff":{"type":"array","items":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["startsAt","endsAt","reason"]}},"position":{"type":"number"},"offeredOnline":{"type":"boolean"},"version":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","displayName","title","gender","mediaId","showPhoto","bookableOnline","colourIndex","status","productIds","hours","dates","timeOff","position","offeredOnline","version","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"patch":{"operationId":"admin.bookingSetup.staff.update","summary":"Update a staff profile","description":"Omitted keys keep their value; lists that are sent replace the stored ones.","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"enum":["female","male","unspecified"],"type":"string"},"mediaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"showPhoto":{"type":"boolean"},"bookableOnline":{"type":"boolean"},"colourIndex":{"type":"number"},"status":{"enum":["active","inactive"],"type":"string"},"productIds":{"type":"array","items":{"type":"string"}},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"number"},"starts":{"type":"string"},"ends":{"type":"string"},"kind":{"enum":["work","break"],"type":"string"}},"required":["weekday","starts","ends","kind"]}},"dates":{"type":"array","items":{"type":"object","properties":{"onDate":{"type":"string"},"kind":{"enum":["work","off"],"type":"string"},"starts":{"anyOf":[{"type":"string"},{"type":"null"}]},"ends":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["onDate","kind","starts","ends","note"]}},"timeOff":{"type":"array","items":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["startsAt","endsAt","reason"]}},"version":{"type":"number"}},"required":["version"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"enum":["female","male","unspecified"],"type":"string"},"mediaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"showPhoto":{"type":"boolean"},"bookableOnline":{"type":"boolean"},"colourIndex":{"type":"number"},"status":{"enum":["active","inactive"],"type":"string"},"productIds":{"type":"array","items":{"type":"string"}},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"number"},"starts":{"type":"string"},"ends":{"type":"string"},"kind":{"enum":["work","break"],"type":"string"}},"required":["weekday","starts","ends","kind"]}},"dates":{"type":"array","items":{"type":"object","properties":{"onDate":{"type":"string"},"kind":{"enum":["work","off"],"type":"string"},"starts":{"anyOf":[{"type":"string"},{"type":"null"}]},"ends":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["onDate","kind","starts","ends","note"]}},"timeOff":{"type":"array","items":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["startsAt","endsAt","reason"]}},"position":{"type":"number"},"offeredOnline":{"type":"boolean"},"version":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","displayName","title","gender","mediaId","showPhoto","bookableOnline","colourIndex","status","productIds","hours","dates","timeOff","position","offeredOnline","version","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.bookingSetup.staff.remove","summary":"Remove a staff profile","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/staff/reorder":{"post":{"operationId":"admin.bookingSetup.staff.reorder","summary":"Set the order of staff","tags":["Admin — Bookings & Enquiries"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"enum":["female","male","unspecified"],"type":"string"},"mediaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"showPhoto":{"type":"boolean"},"bookableOnline":{"type":"boolean"},"colourIndex":{"type":"number"},"status":{"enum":["active","inactive"],"type":"string"},"productIds":{"type":"array","items":{"type":"string"}},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"number"},"starts":{"type":"string"},"ends":{"type":"string"},"kind":{"enum":["work","break"],"type":"string"}},"required":["weekday","starts","ends","kind"]}},"dates":{"type":"array","items":{"type":"object","properties":{"onDate":{"type":"string"},"kind":{"enum":["work","off"],"type":"string"},"starts":{"anyOf":[{"type":"string"},{"type":"null"}]},"ends":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["onDate","kind","starts","ends","note"]}},"timeOff":{"type":"array","items":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["startsAt","endsAt","reason"]}},"position":{"type":"number"},"offeredOnline":{"type":"boolean"},"version":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","displayName","title","gender","mediaId","showPhoto","bookableOnline","colourIndex","status","productIds","hours","dates","timeOff","position","offeredOnline","version","createdAt","updatedAt"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/resource-groups":{"get":{"operationId":"admin.bookingSetup.resourceGroups.list","summary":"List rooms and chairs","tags":["Admin — Bookings & Enquiries"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"enum":["room","chair","station","area"],"type":"string"},"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id","name","position"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","kind","resources","createdAt","updatedAt"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"post":{"operationId":"admin.bookingSetup.resourceGroups.create","summary":"Add a group of rooms or chairs","tags":["Admin — Bookings & Enquiries"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"kind":{"enum":["room","chair","station","area"],"type":"string"},"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["name"]}}},"required":["name","kind","resources"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"enum":["room","chair","station","area"],"type":"string"},"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id","name","position"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","kind","resources","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/resource-groups/{id}":{"put":{"operationId":"admin.bookingSetup.resourceGroups.update","summary":"Replace a group of rooms or chairs","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"kind":{"enum":["room","chair","station","area"],"type":"string"},"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["name"]}}},"required":["name","kind","resources"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"enum":["room","chair","station","area"],"type":"string"},"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id","name","position"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","kind","resources","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.bookingSetup.resourceGroups.remove","summary":"Remove a group of rooms or chairs","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/products/{productId}/profile":{"get":{"operationId":"admin.bookingSetup.profile.get","summary":"Get a service product's booking settings","description":"A service product that never saved its booking settings gets the defaults.","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"productId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"bufferBeforeMin":{"type":"number"},"bufferAfterMin":{"type":"number"},"depositKind":{"enum":["inherit","none","fixed","percent","full"],"type":"string"},"depositValue":{"type":"number"},"staffChoice":{"enum":["choose","any_only","hidden"],"type":"string"},"capacity":{"anyOf":[{"type":"number"},{"type":"null"}]},"minQuantity":{"type":"number"},"maxQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"payAtDoorMax":{"anyOf":[{"type":"number"},{"type":"null"}]},"asksParticipants":{"type":"boolean"},"includedGuests":{"anyOf":[{"type":"number"},{"type":"null"}]},"playsInProductId":{"anyOf":[{"type":"string"},{"type":"null"}]},"onlineBookable":{"type":"boolean"},"staffIds":{"type":"array","items":{"type":"string"}},"resourceGroupIds":{"type":"array","items":{"type":"string"}},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"durationMin":{"anyOf":[{"type":"number"},{"type":"null"}]},"takesPlace":{"type":"boolean"},"weekendPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"minAge":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxAge":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["variantId","durationMin","takesPlace","weekendPricePaisa","minAge","maxAge"]}},"version":{"type":"number"}},"required":["productId","kind","bufferBeforeMin","bufferAfterMin","depositKind","depositValue","staffChoice","capacity","minQuantity","maxQuantity","payAtDoorMax","asksParticipants","includedGuests","playsInProductId","onlineBookable","staffIds","resourceGroupIds","variants","version"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"put":{"operationId":"admin.bookingSetup.profile.put","summary":"Replace a service product's booking settings","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"number"},"profile":{"type":"object","properties":{"bufferBeforeMin":{"type":"number"},"bufferAfterMin":{"type":"number"},"depositKind":{"enum":["inherit","none","fixed","percent","full"],"type":"string"},"depositValue":{"type":"number"},"staffChoice":{"enum":["choose","any_only","hidden"],"type":"string"},"capacity":{"anyOf":[{"type":"number"},{"type":"null"}]},"minQuantity":{"type":"number"},"maxQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"payAtDoorMax":{"anyOf":[{"type":"number"},{"type":"null"}]},"asksParticipants":{"type":"boolean"},"includedGuests":{"anyOf":[{"type":"number"},{"type":"null"}]},"playsInProductId":{"anyOf":[{"type":"string"},{"type":"null"}]},"onlineBookable":{"type":"boolean"},"staffIds":{"type":"array","items":{"type":"string"}},"resourceGroupIds":{"type":"array","items":{"type":"string"}},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"durationMin":{"anyOf":[{"type":"number"},{"type":"null"}]},"takesPlace":{"type":"boolean"},"weekendPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"minAge":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxAge":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["variantId","durationMin","takesPlace","weekendPricePaisa","minAge","maxAge"]}}},"required":["bufferBeforeMin","bufferAfterMin","depositKind","depositValue","staffChoice","capacity","minQuantity","maxQuantity","payAtDoorMax","asksParticipants","includedGuests","playsInProductId","onlineBookable","staffIds","resourceGroupIds","variants"]}},"required":["version","profile"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"productId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"bufferBeforeMin":{"type":"number"},"bufferAfterMin":{"type":"number"},"depositKind":{"enum":["inherit","none","fixed","percent","full"],"type":"string"},"depositValue":{"type":"number"},"staffChoice":{"enum":["choose","any_only","hidden"],"type":"string"},"capacity":{"anyOf":[{"type":"number"},{"type":"null"}]},"minQuantity":{"type":"number"},"maxQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"payAtDoorMax":{"anyOf":[{"type":"number"},{"type":"null"}]},"asksParticipants":{"type":"boolean"},"includedGuests":{"anyOf":[{"type":"number"},{"type":"null"}]},"playsInProductId":{"anyOf":[{"type":"string"},{"type":"null"}]},"onlineBookable":{"type":"boolean"},"staffIds":{"type":"array","items":{"type":"string"}},"resourceGroupIds":{"type":"array","items":{"type":"string"}},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"durationMin":{"anyOf":[{"type":"number"},{"type":"null"}]},"takesPlace":{"type":"boolean"},"weekendPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"minAge":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxAge":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["variantId","durationMin","takesPlace","weekendPricePaisa","minAge","maxAge"]}},"version":{"type":"number"}},"required":["productId","kind","bufferBeforeMin","bufferAfterMin","depositKind","depositValue","staffChoice","capacity","minQuantity","maxQuantity","payAtDoorMax","asksParticipants","includedGuests","playsInProductId","onlineBookable","staffIds","resourceGroupIds","variants","version"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/products/{productId}/sessions":{"get":{"operationId":"admin.bookingSetup.sessions.get","summary":"Get a session product's schedule","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"schedules":{"type":"array","items":{"type":"object","properties":{"weekdays":{"type":"array","items":{"type":"number"}},"startTimes":{"type":"array","items":{"type":"string"}},"durationMin":{"type":"number"},"validFrom":{"type":"string"},"validTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"capacity":{"anyOf":[{"type":"number"},{"type":"null"}]},"hostStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["weekdays","startTimes","durationMin","validFrom","validTo","capacity","hostStaffId"]}},"exceptions":{"type":"array","items":{"type":"object","properties":{"onDate":{"type":"string"},"kind":{"enum":["closed","capacity","extra"],"type":"string"},"startTime":{"anyOf":[{"type":"string"},{"type":"null"}]},"capacity":{"anyOf":[{"type":"number"},{"type":"null"}]},"durationMin":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["onDate","kind","startTime","capacity","durationMin"]}},"productId":{"type":"string"},"upcoming":{"type":"number"},"needsAttention":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"booked":{"type":"number"}},"required":["id","startsAt","booked"]}}},"required":["schedules","exceptions","productId","upcoming","needsAttention"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"put":{"operationId":"admin.bookingSetup.sessions.put","summary":"Replace a session product's schedule","description":"Sessions are created for the booking window from the schedule. A session the new schedule no longer has is removed when nobody has booked it; one with bookings is closed to new sales and listed in `needsAttention`. Needs the Scale plan (`feature_unavailable`).","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"object","properties":{"schedules":{"type":"array","items":{"type":"object","properties":{"weekdays":{"type":"array","items":{"type":"number"}},"startTimes":{"type":"array","items":{"type":"string"}},"durationMin":{"type":"number"},"validFrom":{"type":"string"},"validTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"capacity":{"anyOf":[{"type":"number"},{"type":"null"}]},"hostStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["weekdays","startTimes","durationMin","validFrom","validTo","capacity","hostStaffId"]}},"exceptions":{"type":"array","items":{"type":"object","properties":{"onDate":{"type":"string"},"kind":{"enum":["closed","capacity","extra"],"type":"string"},"startTime":{"anyOf":[{"type":"string"},{"type":"null"}]},"capacity":{"anyOf":[{"type":"number"},{"type":"null"}]},"durationMin":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["onDate","kind","startTime","capacity","durationMin"]}}},"required":["schedules","exceptions"]}},"required":["plan"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"schedules":{"type":"array","items":{"type":"object","properties":{"weekdays":{"type":"array","items":{"type":"number"}},"startTimes":{"type":"array","items":{"type":"string"}},"durationMin":{"type":"number"},"validFrom":{"type":"string"},"validTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"capacity":{"anyOf":[{"type":"number"},{"type":"null"}]},"hostStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["weekdays","startTimes","durationMin","validFrom","validTo","capacity","hostStaffId"]}},"exceptions":{"type":"array","items":{"type":"object","properties":{"onDate":{"type":"string"},"kind":{"enum":["closed","capacity","extra"],"type":"string"},"startTime":{"anyOf":[{"type":"string"},{"type":"null"}]},"capacity":{"anyOf":[{"type":"number"},{"type":"null"}]},"durationMin":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["onDate","kind","startTime","capacity","durationMin"]}},"productId":{"type":"string"},"upcoming":{"type":"number"},"needsAttention":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"booked":{"type":"number"}},"required":["id","startsAt","booked"]}}},"required":["schedules","exceptions","productId","upcoming","needsAttention"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/availability":{"get":{"operationId":"admin.bookings.availability","summary":"Free starts for a visit, for the front desk","description":"Everyone active is offered, not only people offered online.","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"variantIds","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"staffIds","in":"query","required":false,"schema":{"type":"array","items":{"anyOf":[{"type":"string"},{"const":"any"}]}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"excludeLineBookingId","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"timezone":{"type":"string"},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"starts":{"type":"array","items":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staff":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}}},"required":["startsAt","staff"]}}},"required":["date","starts"]}}},"required":["timezone","days"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/day":{"get":{"operationId":"admin.bookings.day","summary":"The calendar for one day","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"date","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string"},"timezone":{"type":"string"},"hours":{"type":"array","items":{"type":"object","properties":{"opens":{"type":"string","format":"date-time","x-native-type":"date"},"closes":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["opens","closes"]}},"columns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"colourIndex":{"type":"number"},"working":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","format":"date-time","x-native-type":"date"},"end":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["start","end"]}}},"required":["id","name","title","colourIndex","working"]}},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"orderNumber":{"type":"number"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"customerName":{"type":"string"},"phone":{"type":"string"},"service":{"type":"string"},"option":{"anyOf":[{"type":"string"},{"type":"null"}]},"paymentStatus":{"type":"string"},"totalPaisa":{"type":"number"},"collectedPaisa":{"type":"number"},"advanceDuePaisa":{"type":"number"},"noShows":{"type":"number"}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","orderNumber","customerId","customerName","phone","service","option","paymentStatus","totalPaisa","collectedPaisa","advanceDuePaisa","noShows"]}}},"required":["date","timezone","hours","columns","blocks"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/lines/{id}/status":{"post":{"operationId":"admin.bookings.transition","summary":"Move a booking: booked, arrived, completed, did not come, cancelled","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"number"},"to":{"enum":["booked","arrived","completed","no_show","cancelled"],"type":"string"},"reason":{"type":"string"}},"required":["version","to"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/lines/{id}/reschedule":{"post":{"operationId":"admin.bookings.reschedule","summary":"Move a booking to another time or person","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"number"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"const":"any"}],"default":"any"},"overbook":{"type":"boolean","default":false}},"required":["version","startsAt"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/week":{"get":{"operationId":"admin.bookings.week","summary":"One person's week, from a date","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"staffId","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"timezone":{"type":"string"},"hours":{"type":"array","items":{"type":"object","properties":{"opens":{"type":"string","format":"date-time","x-native-type":"date"},"closes":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["opens","closes"]}},"columns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"colourIndex":{"type":"number"},"working":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","format":"date-time","x-native-type":"date"},"end":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["start","end"]}}},"required":["id","name","title","colourIndex","working"]}},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"orderNumber":{"type":"number"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"customerName":{"type":"string"},"phone":{"type":"string"},"service":{"type":"string"},"option":{"anyOf":[{"type":"string"},{"type":"null"}]},"paymentStatus":{"type":"string"},"totalPaisa":{"type":"number"},"collectedPaisa":{"type":"number"},"advanceDuePaisa":{"type":"number"},"noShows":{"type":"number"}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","orderNumber","customerId","customerName","phone","service","option","paymentStatus","totalPaisa","collectedPaisa","advanceDuePaisa","noShows"]}}},"required":["date","timezone","hours","columns","blocks"]}}},"required":["staffId","days"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/customers/{customerId}":{"get":{"operationId":"admin.bookings.customer","summary":"A customer's bookings","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"upcoming":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"orderNumber":{"type":"number"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"customerName":{"type":"string"},"phone":{"type":"string"},"service":{"type":"string"},"option":{"anyOf":[{"type":"string"},{"type":"null"}]},"paymentStatus":{"type":"string"},"totalPaisa":{"type":"number"},"collectedPaisa":{"type":"number"},"advanceDuePaisa":{"type":"number"},"noShows":{"type":"number"}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","orderNumber","customerId","customerName","phone","service","option","paymentStatus","totalPaisa","collectedPaisa","advanceDuePaisa","noShows"]}},"past":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"orderNumber":{"type":"number"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"customerName":{"type":"string"},"phone":{"type":"string"},"service":{"type":"string"},"option":{"anyOf":[{"type":"string"},{"type":"null"}]},"paymentStatus":{"type":"string"},"totalPaisa":{"type":"number"},"collectedPaisa":{"type":"number"},"advanceDuePaisa":{"type":"number"},"noShows":{"type":"number"}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","orderNumber","customerId","customerName","phone","service","option","paymentStatus","totalPaisa","collectedPaisa","advanceDuePaisa","noShows"]}},"noShows":{"type":"number"}},"required":["upcoming","past","noShows"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/orders/{id}/payments":{"post":{"operationId":"admin.bookings.recordPayment","summary":"Record money taken at the visit, or an advance","description":"Cash, card machine, wallet or bank transfer, recorded by staff. Capped at what is still due.","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amountPaisa":{"type":"number"},"method":{"enum":["cash","card_machine","wallet","bank_transfer"],"type":"string"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"advance":{"type":"boolean","default":false}},"required":["amountPaisa","method"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"collectedPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"paymentStatus":{"type":"string"}},"required":["collectedPaisa","totalPaisa","paymentStatus"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/refunds-due":{"get":{"operationId":"admin.bookings.refundsDue","summary":"Money to give back on bookings","description":"Cancelled bookings with money still held, and payments made after a booking was cancelled. devhelp never refunds on its own: staff refund through the order.","tags":["Admin — Bookings & Enquiries"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"orderId":{"type":"string"},"orderNumber":{"type":"number"},"customerName":{"type":"string"},"phone":{"type":"string"},"reason":{"enum":["cancelled","paid_after"],"type":"string"},"amountPaisa":{"type":"number"},"paidOnline":{"type":"boolean"},"at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["orderId","orderNumber","customerName","phone","reason","amountPaisa","paidOnline","at"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/reminders":{"get":{"operationId":"admin.bookings.reminders","summary":"Reminders for staff to send","description":"Today's and tomorrow's reminders that could not go by email, for staff to send from WhatsApp. Each carries `wa.me` links with the message in English and Roman Urdu.","tags":["Admin — Bookings & Enquiries"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"orderNumber":{"type":"number"},"customerName":{"type":"string"},"phone":{"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"services":{"type":"array","items":{"type":"string"}},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"offsetMin":{"type":"number"},"whatsapp":{"anyOf":[{"type":"object","properties":{"english":{"type":"string"},"romanUrdu":{"type":"string"}},"required":["english","romanUrdu"]},{"type":"null"}]}},"required":["id","orderId","orderNumber","customerName","phone","startsAt","services","staffName","offsetMin","whatsapp"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/reminders/{id}/sent":{"post":{"operationId":"admin.bookings.reminderSent","summary":"Mark a reminder as sent by staff","description":"Takes it off the list. Marking one already sent changes nothing.","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/reports":{"get":{"operationId":"admin.bookings.report","summary":"Bookings, money and places for a date range","description":"Counts by person, service and day, value of the bookings kept, money staff recorded, and places sold per session. Test orders are left out. At most 92 days.","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"totals":{"type":"object","properties":{"bookings":{"type":"number"},"completed":{"type":"number"},"noShows":{"type":"number"},"cancelled":{"type":"number"},"valuePaisa":{"type":"number"},"recordedAtVisitPaisa":{"type":"number"},"advancesRecordedPaisa":{"type":"number"}},"required":["bookings","completed","noShows","cancelled","valuePaisa","recordedAtVisitPaisa","advancesRecordedPaisa"]},"byStaff":{"type":"array","items":{"type":"object","properties":{"bookings":{"type":"number"},"completed":{"type":"number"},"noShows":{"type":"number"},"cancelled":{"type":"number"},"valuePaisa":{"type":"number"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"}},"required":["bookings","completed","noShows","cancelled","valuePaisa","staffId","name"]}},"byService":{"type":"array","items":{"type":"object","properties":{"bookings":{"type":"number"},"completed":{"type":"number"},"noShows":{"type":"number"},"cancelled":{"type":"number"},"valuePaisa":{"type":"number"},"productId":{"type":"string"},"title":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"}},"required":["bookings","completed","noShows","cancelled","valuePaisa","productId","title","kind"]}},"sessions":{"type":"array","items":{"type":"object","properties":{"sessionId":{"type":"string"},"productId":{"type":"string"},"title":{"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"capacity":{"type":"number"},"sold":{"type":"number"},"arrived":{"type":"number"}},"required":["sessionId","productId","title","startsAt","capacity","sold","arrived"]}},"days":{"type":"array","items":{"type":"object","properties":{"bookings":{"type":"number"},"completed":{"type":"number"},"noShows":{"type":"number"},"cancelled":{"type":"number"},"valuePaisa":{"type":"number"},"date":{"type":"string"},"ticketsSold":{"type":"number"},"ticketsArrived":{"type":"number"},"capacity":{"type":"number"}},"required":["bookings","completed","noShows","cancelled","valuePaisa","date","ticketsSold","ticketsArrived","capacity"]}}},"required":["from","to","totals","byStaff","byService","sessions","days"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/lines/{id}/check-in":{"post":{"operationId":"admin.bookings.checkIn","summary":"Admit people for a booking","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quantity":{"type":"number"}},"required":["quantity"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/front-desk":{"get":{"operationId":"admin.bookings.frontDesk","summary":"The front desk for a day: sessions, places and parties","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"date","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string"},"timezone":{"type":"string"},"weekend":{"type":"boolean"},"totals":{"type":"object","properties":{"tickets":{"type":"number"},"arrived":{"type":"number"},"collectedPaisa":{"type":"number"}},"required":["tickets","arrived","collectedPaisa"]},"products":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"title":{"type":"string"},"tickets":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"title":{"type":"string"},"pricePaisa":{"type":"number"},"takesPlace":{"type":"boolean"}},"required":["variantId","title","pricePaisa","takesPlace"]}},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"capacity":{"type":"number"},"booked":{"type":"number"},"arrived":{"type":"number"},"status":{"enum":["open","closed","cancelled"],"type":"string"}},"required":["id","startsAt","endsAt","capacity","booked","arrived","status"]}}},"required":["productId","title","tickets","sessions"]}},"parties":{"type":"array","items":{"type":"object","properties":{"lineBookingId":{"type":"string"},"orderId":{"type":"string"},"orderNumber":{"type":"number"},"customerName":{"type":"string"},"phone":{"type":"string"},"title":{"type":"string"},"room":{"anyOf":[{"type":"string"},{"type":"null"}]},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"guests":{"type":"number"},"status":{"type":"string"},"duePaisa":{"type":"number"}},"required":["lineBookingId","orderId","orderNumber","customerName","phone","title","room","startsAt","endsAt","guests","status","duePaisa"]}}},"required":["date","timezone","weekend","totals","products","parties"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/door":{"get":{"operationId":"admin.bookings.door","summary":"The door list of a session, or a search of the day","description":"Finds orders with tickets by booking number, the code under the QR, name or phone.","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"date","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"sessionId","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"orderId":{"type":"string"},"orderNumber":{"type":"number"},"sessionId":{"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"customerName":{"type":"string"},"phone":{"type":"string"},"totalPaisa":{"type":"number"},"collectedPaisa":{"type":"number"},"duePaisa":{"type":"number"},"paidOnline":{"type":"boolean"},"awaitingPayment":{"type":"boolean"},"tickets":{"type":"array","items":{"type":"object","properties":{"lineBookingId":{"type":"string"},"title":{"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"status":{"type":"string"},"checkCode":{"type":"string"}},"required":["lineBookingId","title","quantity","arrivedQuantity","status","checkCode"]}},"extras":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"quantity":{"type":"number"}},"required":["title","quantity"]}},"participants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"age":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","age"]}},"consentAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["orderId","orderNumber","sessionId","startsAt","customerName","phone","totalPaisa","collectedPaisa","duePaisa","paidOnline","awaitingPayment","tickets","extras","participants","consentAt"]}}},"required":["entries"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/bookings/check-in":{"post":{"operationId":"admin.bookings.checkInMany","summary":"Admit people for several ticket lines at once","description":"All or nothing: never more than each line bought (`over_quantity`).","tags":["Admin — Bookings & Enquiries"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"quantity":{"type":"number"}},"required":["id","quantity"]}}},"required":["items"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/enquiries":{"get":{"operationId":"admin.enquiries.list","summary":"List enquiries","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"status","in":"query","schema":{"enum":["new","contacted","booked","closed"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"number","default":100},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string"},"serviceText":{"type":"string"},"preferredText":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["new","contacted","booked","closed"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","phone","serviceText","preferredText","note","status","createdAt","updatedAt"]}},"counts":{"type":"object","propertyNames":{"enum":["new","contacted","booked","closed"],"type":"string"},"additionalProperties":{"type":"number"}}},"required":["items","counts"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/enquiries/{id}":{"patch":{"operationId":"admin.enquiries.update","summary":"Set an enquiry's status","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"enum":["new","contacted","booked","closed"],"type":"string"}},"required":["status"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string"},"serviceText":{"type":"string"},"preferredText":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["new","contacted","booked","closed"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","phone","serviceText","preferredText","note","status","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.enquiries.remove","summary":"Remove an enquiry","tags":["Admin — Bookings & Enquiries"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/customers/{id}/tags":{"get":{"operationId":"admin.marketing.tags.ofCustomer","tags":["Admin — Customers & Discounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}}},"required":["tags"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"put":{"operationId":"admin.marketing.tags.setForCustomer","description":"Replace a customer's tags; new names create tags.","tags":["Admin — Customers & Discounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}}},"required":["tags"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}}},"required":["tags"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/tax-classes":{"get":{"operationId":"admin.taxClasses.list","tags":["Admin — Store & Settings"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rateBps":{"type":"number"},"pctCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"productCount":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","rateBps","pctCode","productCount","createdAt"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"post":{"operationId":"admin.taxClasses.create","tags":["Admin — Store & Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"rateBps":{"type":"number"},"pctCode":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","rateBps"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rateBps":{"type":"number"},"pctCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"productCount":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","rateBps","pctCode","productCount","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/tax-classes/{id}":{"patch":{"operationId":"admin.taxClasses.update","tags":["Admin — Store & Settings"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"rateBps":{"type":"number"},"pctCode":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rateBps":{"type":"number"},"pctCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"productCount":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","rateBps","pctCode","productCount","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/tax-classes/{id}/retire":{"post":{"operationId":"admin.taxClasses.retire","description":"Products in the class go back to the store's own rate. Placed orders keep theirs.","tags":["Admin — Store & Settings"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"const":true}},"required":["id","deleted"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/store/checkout":{"get":{"operationId":"admin.checkout.get","summary":"Get the store's checkout settings","tags":["Admin — Store & Settings"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"emailMode":{"enum":["off","optional","required"],"type":"string"},"fields":{"type":"object","properties":{"line2":{"enum":["hidden","optional","required"],"type":"string"},"landmark":{"enum":["hidden","optional","required"],"type":"string"},"postalCode":{"enum":["auto","hidden","optional","required"],"type":"string"}},"required":["line2","landmark","postalCode"]},"orderNotes":{"type":"boolean"},"trustMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"hiddenPolicies":{"type":"array","items":{"type":"string"}},"requireTerms":{"type":"boolean"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["emailMode","fields","orderNotes","trustMessage","hiddenPolicies","requireTerms","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"patch":{"operationId":"admin.checkout.update","summary":"Update the store's checkout settings","description":"Omitted keys keep their value. Emits `store.updated`, which purges the storefront's cached store.","tags":["Admin — Store & Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emailMode":{"enum":["off","optional","required"],"type":"string"},"fields":{"type":"object","properties":{"line2":{"enum":["hidden","optional","required"],"type":"string"},"landmark":{"enum":["hidden","optional","required"],"type":"string"},"postalCode":{"enum":["auto","hidden","optional","required"],"type":"string"}}},"orderNotes":{"type":"boolean"},"trustMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"hiddenPolicies":{"type":"array","items":{"type":"string"}},"requireTerms":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"emailMode":{"enum":["off","optional","required"],"type":"string"},"fields":{"type":"object","properties":{"line2":{"enum":["hidden","optional","required"],"type":"string"},"landmark":{"enum":["hidden","optional","required"],"type":"string"},"postalCode":{"enum":["auto","hidden","optional","required"],"type":"string"}},"required":["line2","landmark","postalCode"]},"orderNotes":{"type":"boolean"},"trustMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"hiddenPolicies":{"type":"array","items":{"type":"string"}},"requireTerms":{"type":"boolean"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["emailMode","fields","orderNotes","trustMessage","hiddenPolicies","requireTerms","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/store/customer-portal":{"get":{"operationId":"admin.customerPortal.get","summary":"Get the store's customer portal settings","tags":["Admin — Store & Settings"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"showHeaderLink":{"type":"boolean"},"loginMethods":{"type":"object","properties":{"emailOtp":{"type":"boolean"},"whatsappOtp":{"type":"boolean"},"smsOtp":{"type":"boolean"}},"required":["emailOtp","whatsappOtp","smsOtp"]},"allowAddressBook":{"type":"boolean"},"allowMarketingOptIn":{"type":"boolean"},"showSmsPreferences":{"type":"boolean"},"allowReorder":{"type":"boolean"},"allowCodSelfConfirm":{"type":"boolean"},"allowDeliveryEdit":{"type":"boolean"},"deliveryEditCutoff":{"enum":["before_confirmed","before_packed","before_dispatched"],"type":"string"},"deliveryEditWindowMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowCityProvinceChange":{"type":"boolean"},"allowPrepaidDeliveryEdit":{"type":"boolean"},"allowOrderNoteEdit":{"type":"boolean"},"allowOrderCancellation":{"type":"boolean"},"cancellationCutoff":{"enum":["before_confirmed","before_packed","before_dispatched"],"type":"string"},"cancellationWindowMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowPrepaidCancellation":{"type":"boolean"},"allowVariantSwap":{"type":"boolean"},"variantSwapCutoff":{"enum":["before_confirmed","before_packed","before_dispatched"],"type":"string"},"allowCodItemEdits":{"type":"boolean"},"codItemEditWindowMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowReturnRequests":{"type":"boolean"},"returnWindowDays":{"type":"number"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["enabled","showHeaderLink","loginMethods","allowAddressBook","allowMarketingOptIn","showSmsPreferences","allowReorder","allowCodSelfConfirm","allowDeliveryEdit","deliveryEditCutoff","deliveryEditWindowMinutes","allowCityProvinceChange","allowPrepaidDeliveryEdit","allowOrderNoteEdit","allowOrderCancellation","cancellationCutoff","cancellationWindowMinutes","allowPrepaidCancellation","allowVariantSwap","variantSwapCutoff","allowCodItemEdits","codItemEditWindowMinutes","allowReturnRequests","returnWindowDays","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"put":{"operationId":"admin.customerPortal.update","summary":"Update the store's customer portal settings","tags":["Admin — Store & Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"showHeaderLink":{"type":"boolean"},"loginMethods":{"type":"object","properties":{"emailOtp":{"type":"boolean"},"whatsappOtp":{"type":"boolean"},"smsOtp":{"type":"boolean"}}},"allowAddressBook":{"type":"boolean"},"allowMarketingOptIn":{"type":"boolean"},"showSmsPreferences":{"type":"boolean"},"allowReorder":{"type":"boolean"},"allowCodSelfConfirm":{"type":"boolean"},"allowDeliveryEdit":{"type":"boolean"},"deliveryEditCutoff":{"enum":["before_confirmed","before_packed","before_dispatched"],"type":"string"},"deliveryEditWindowMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowCityProvinceChange":{"type":"boolean"},"allowPrepaidDeliveryEdit":{"type":"boolean"},"allowOrderNoteEdit":{"type":"boolean"},"allowOrderCancellation":{"type":"boolean"},"cancellationCutoff":{"enum":["before_confirmed","before_packed","before_dispatched"],"type":"string"},"cancellationWindowMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowPrepaidCancellation":{"type":"boolean"},"allowVariantSwap":{"type":"boolean"},"variantSwapCutoff":{"enum":["before_confirmed","before_packed","before_dispatched"],"type":"string"},"allowCodItemEdits":{"type":"boolean"},"codItemEditWindowMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowReturnRequests":{"type":"boolean"},"returnWindowDays":{"type":"number"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"showHeaderLink":{"type":"boolean"},"loginMethods":{"type":"object","properties":{"emailOtp":{"type":"boolean"},"whatsappOtp":{"type":"boolean"},"smsOtp":{"type":"boolean"}},"required":["emailOtp","whatsappOtp","smsOtp"]},"allowAddressBook":{"type":"boolean"},"allowMarketingOptIn":{"type":"boolean"},"showSmsPreferences":{"type":"boolean"},"allowReorder":{"type":"boolean"},"allowCodSelfConfirm":{"type":"boolean"},"allowDeliveryEdit":{"type":"boolean"},"deliveryEditCutoff":{"enum":["before_confirmed","before_packed","before_dispatched"],"type":"string"},"deliveryEditWindowMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowCityProvinceChange":{"type":"boolean"},"allowPrepaidDeliveryEdit":{"type":"boolean"},"allowOrderNoteEdit":{"type":"boolean"},"allowOrderCancellation":{"type":"boolean"},"cancellationCutoff":{"enum":["before_confirmed","before_packed","before_dispatched"],"type":"string"},"cancellationWindowMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowPrepaidCancellation":{"type":"boolean"},"allowVariantSwap":{"type":"boolean"},"variantSwapCutoff":{"enum":["before_confirmed","before_packed","before_dispatched"],"type":"string"},"allowCodItemEdits":{"type":"boolean"},"codItemEditWindowMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowReturnRequests":{"type":"boolean"},"returnWindowDays":{"type":"number"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["enabled","showHeaderLink","loginMethods","allowAddressBook","allowMarketingOptIn","showSmsPreferences","allowReorder","allowCodSelfConfirm","allowDeliveryEdit","deliveryEditCutoff","deliveryEditWindowMinutes","allowCityProvinceChange","allowPrepaidDeliveryEdit","allowOrderNoteEdit","allowOrderCancellation","cancellationCutoff","cancellationWindowMinutes","allowPrepaidCancellation","allowVariantSwap","variantSwapCutoff","allowCodItemEdits","codItemEditWindowMinutes","allowReturnRequests","returnWindowDays","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/store/orders":{"get":{"operationId":"admin.orderSettings.get","summary":"Get the store's order settings","tags":["Admin — Store & Settings"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"unconfirmed":{"type":"object","properties":{"afterAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"afterHours":{"anyOf":[{"type":"number"},{"type":"null"}]},"action":{"enum":["hold","cancel","none"],"type":"string"}},"required":["afterAttempts","afterHours","action"]},"noNewsAfterDays":{"type":"number"},"returningAfterDays":{"type":"number"},"unpaidAfterDays":{"type":"number"},"checkFirstAbovePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["unconfirmed","noNewsAfterDays","returningAfterDays","unpaidAfterDays","checkFirstAbovePaisa"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"put":{"operationId":"admin.orderSettings.update","summary":"Replace the store's order settings","tags":["Admin — Store & Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"unconfirmed":{"type":"object","properties":{"afterAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"afterHours":{"anyOf":[{"type":"number"},{"type":"null"}]},"action":{"enum":["hold","cancel","none"],"type":"string"}},"required":["afterAttempts","afterHours","action"]},"noNewsAfterDays":{"type":"number"},"returningAfterDays":{"type":"number"},"unpaidAfterDays":{"type":"number"},"checkFirstAbovePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["unconfirmed","checkFirstAbovePaisa"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"unconfirmed":{"type":"object","properties":{"afterAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"afterHours":{"anyOf":[{"type":"number"},{"type":"null"}]},"action":{"enum":["hold","cancel","none"],"type":"string"}},"required":["afterAttempts","afterHours","action"]},"noNewsAfterDays":{"type":"number"},"returningAfterDays":{"type":"number"},"unpaidAfterDays":{"type":"number"},"checkFirstAbovePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["unconfirmed","noNewsAfterDays","returningAfterDays","unpaidAfterDays","checkFirstAbovePaisa"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/courier-payments/ledger/balances":{"get":{"operationId":"admin.courierPayments.balances","tags":["Admin — Fulfillments & Shipping"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"courierName":{"type":"string"},"owedPaisa":{"type":"number"},"underClaimPaisa":{"type":"number"},"settledPaisa":{"type":"number"},"shortPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"remainingPaisa":{"type":"number"},"underClaimPaisa":{"type":"number"}},"required":["id","remainingPaisa","underClaimPaisa"]}}},"required":["courierName","owedPaisa","underClaimPaisa","settledPaisa","shortPaisa","payments"]}}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/courier-payments/ledger/statement":{"get":{"operationId":"admin.courierPayments.statement","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"courierName","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"fulfillmentId","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"openingPaisa":{"type":"number"},"closingPaisa":{"type":"number"},"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"courierName":{"type":"string"},"kind":{"type":"string"},"fulfillmentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"remittanceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"claimId":{"anyOf":[{"type":"string"},{"type":"null"}]},"duePaisa":{"type":"number"},"receivedPaisa":{"type":"number"},"claimedPaisa":{"type":"number"},"writtenOffPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"orderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"orderNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"runningBalancePaisa":{"type":"number"}},"required":["id","courierName","kind","fulfillmentId","remittanceId","claimId","duePaisa","receivedPaisa","claimedPaisa","writtenOffPaisa","note","createdAt","orderId","orderNumber","trackingNumber","handoverId","runningBalancePaisa"]}}},"required":["openingPaisa","closingPaisa","entries"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/courier-payments/awaiting/summary":{"get":{"operationId":"admin.courierPayments.awaitingSummary","summary":"What each courier owes","tags":["Admin — Fulfillments & Shipping"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"couriers":{"type":"array","items":{"type":"object","properties":{"courierName":{"type":"string"},"parcels":{"type":"number"},"cashPaisa":{"type":"number"},"overdueParcels":{"type":"number"},"overdueCashPaisa":{"type":"number"}},"required":["courierName","parcels","cashPaisa","overdueParcels","overdueCashPaisa"]}},"unpaidAfterDays":{"type":"number"}},"required":["couriers","unpaidAfterDays"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/courier-payments/awaiting":{"get":{"operationId":"admin.courierPayments.awaiting","summary":"Delivered parcels no courier payment covers yet, oldest delivery first","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"courierName","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"overdue","in":"query","schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"courierName":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"cashPaisa":{"type":"number"},"deliveredAt":{"type":"string","format":"date-time","x-native-type":"date"},"overdue":{"type":"boolean"},"order":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"recipientName":{"type":"string"},"city":{"type":"string"},"province":{"type":"string"}},"required":["id","orderNumber","recipientName","city","province"]}},"required":["id","courierName","deliveryServiceId","trackingNumber","cashPaisa","deliveredAt","overdue","order"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/courier-payments":{"post":{"operationId":"admin.courierPayments.create","summary":"Record a payment from a courier","description":"Lists the delivered parcels it covers, each settled once; a parcel already covered, not delivered, collecting nothing or carried by the store's own delivery service is refused. Requires an `Idempotency-Key` header.","tags":["Admin — Fulfillments & Shipping"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"courierName":{"type":"string"},"receivedOn":{"type":"string"},"reference":{"type":"string"},"amountPaisa":{"type":"number"},"deductions":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["delivery_charges","cod_fee","tax_withheld","other"],"type":"string"},"label":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["kind","amountPaisa"]},"default":[]},"parcelIds":{"type":"array","items":{"type":"string"}},"note":{"type":"string"}},"required":["courierName","receivedOn","amountPaisa","parcelIds"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"courierName":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"receivedOn":{"type":"string"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"amountPaisa":{"type":"number"},"deductions":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["delivery_charges","cod_fee","tax_withheld","other"],"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["kind","label","amountPaisa"]}},"parcelCount":{"type":"number"},"parcelsCashPaisa":{"type":"number"},"differencePaisa":{"type":"number"},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"parcels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"cashPaisa":{"type":"number"},"order":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"}},"required":["id","orderNumber"]}},"required":["id","trackingNumber","cashPaisa","order"]}}},"required":["id","courierName","deliveryServiceId","receivedOn","reference","amountPaisa","deductions","parcelCount","parcelsCashPaisa","differencePaisa","claims","note","actorType","createdAt","parcels"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"get":{"operationId":"admin.courierPayments.list","summary":"List courier payments, newest first","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"courierName":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"receivedOn":{"type":"string"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"amountPaisa":{"type":"number"},"deductions":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["delivery_charges","cod_fee","tax_withheld","other"],"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["kind","label","amountPaisa"]}},"parcelCount":{"type":"number"},"parcelsCashPaisa":{"type":"number"},"differencePaisa":{"type":"number"},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","courierName","deliveryServiceId","receivedOn","reference","amountPaisa","deductions","parcelCount","parcelsCashPaisa","differencePaisa","claims","note","actorType","createdAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/courier-payments/{id}/void":{"post":{"operationId":"admin.courierPayments.void","summary":"Void a courier payment recorded by mistake","description":"Retires the payment; its parcels wait for a courier payment again. Order money is unchanged.","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/courier-payments/{id}":{"get":{"operationId":"admin.courierPayments.get","summary":"Get a courier payment with its parcels","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"courierName":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"receivedOn":{"type":"string"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"amountPaisa":{"type":"number"},"deductions":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["delivery_charges","cod_fee","tax_withheld","other"],"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["kind","label","amountPaisa"]}},"parcelCount":{"type":"number"},"parcelsCashPaisa":{"type":"number"},"differencePaisa":{"type":"number"},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"parcels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"cashPaisa":{"type":"number"},"order":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"}},"required":["id","orderNumber"]}},"required":["id","trackingNumber","cashPaisa","order"]}}},"required":["id","courierName","deliveryServiceId","receivedOn","reference","amountPaisa","deductions","parcelCount","parcelsCashPaisa","differencePaisa","claims","note","actorType","createdAt","parcels"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/order-views":{"get":{"operationId":"admin.orderViews.list","summary":"List the store's order views, in order","tags":["Admin — Orders"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"anyOf":[{"enum":["all","to-confirm","on-hold","to-pack","with-courier","needs-attention","delivered","returned","cancelled"],"type":"string"},{"type":"null"}]},"name":{"type":"string"},"hidden":{"type":"boolean"},"filters":{"type":"object","properties":{"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"attention":{"enum":["to-confirm","on-hold","to-pack","with-courier","needs-attention","delivered","returned"],"type":"string"},"sort":{"enum":["newest","oldest"],"type":"string"},"discountCode":{"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"placed":{"enum":["today","7d","30d"],"type":"string"},"lastOutcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"parcelStatus":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"riskTier":{"enum":["low","check","high"],"type":"string"},"courierName":{"type":"string"},"city":{"type":"string"},"cancelReasonCode":{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"}}}},"required":["id","key","name","hidden","filters"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"put":{"operationId":"admin.orderViews.replace","summary":"Replace the store's order views","description":"The whole list, in order. Every default view must be present (hide it instead); a view the store made that is left out is removed.","tags":["Admin — Orders"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"views":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"anyOf":[{"enum":["all","to-confirm","on-hold","to-pack","with-courier","needs-attention","delivered","returned","cancelled"],"type":"string"},{"type":"null"}]},"name":{"type":"string"},"hidden":{"type":"boolean","default":false},"filters":{"type":"object","properties":{"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"attention":{"enum":["to-confirm","on-hold","to-pack","with-courier","needs-attention","delivered","returned"],"type":"string"},"sort":{"enum":["newest","oldest"],"type":"string"},"discountCode":{"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"placed":{"enum":["today","7d","30d"],"type":"string"},"lastOutcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"parcelStatus":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"riskTier":{"enum":["low","check","high"],"type":"string"},"courierName":{"type":"string"},"city":{"type":"string"},"cancelReasonCode":{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"}}}},"required":["name","filters"]}}},"required":["views"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"anyOf":[{"enum":["all","to-confirm","on-hold","to-pack","with-courier","needs-attention","delivered","returned","cancelled"],"type":"string"},{"type":"null"}]},"name":{"type":"string"},"hidden":{"type":"boolean"},"filters":{"type":"object","properties":{"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"attention":{"enum":["to-confirm","on-hold","to-pack","with-courier","needs-attention","delivered","returned"],"type":"string"},"sort":{"enum":["newest","oldest"],"type":"string"},"discountCode":{"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"placed":{"enum":["today","7d","30d"],"type":"string"},"lastOutcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"parcelStatus":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"riskTier":{"enum":["low","check","high"],"type":"string"},"courierName":{"type":"string"},"city":{"type":"string"},"cancelReasonCode":{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"}}}},"required":["id","key","name","hidden","filters"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/blog":{"get":{"operationId":"admin.blog.list","tags":["Admin — Content & Reviews"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"categoryId","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"handle":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"excerpt":{"type":"string"},"authorName":{"type":"string"},"featuredImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"categoryIds":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"status":{"enum":["draft","published","deleted"],"type":"string"},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["handle","title","body","excerpt","authorName","featuredImageId","categoryIds","tags","seoTitle","seoDescription","seoImageId","id","status","publishedAt","createdAt","updatedAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"post":{"operationId":"admin.blog.create","tags":["Admin — Content & Reviews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"handle":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"excerpt":{"type":"string"},"authorName":{"type":"string"},"featuredImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"categoryIds":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["handle","title","body","excerpt","authorName","featuredImageId","categoryIds","tags","seoTitle","seoDescription","seoImageId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"handle":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"excerpt":{"type":"string"},"authorName":{"type":"string"},"featuredImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"categoryIds":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"status":{"enum":["draft","published","deleted"],"type":"string"},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["handle","title","body","excerpt","authorName","featuredImageId","categoryIds","tags","seoTitle","seoDescription","seoImageId","id","status","publishedAt","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/blog/{id}":{"get":{"operationId":"admin.blog.get","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"handle":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"excerpt":{"type":"string"},"authorName":{"type":"string"},"featuredImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"categoryIds":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"status":{"enum":["draft","published","deleted"],"type":"string"},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["handle","title","body","excerpt","authorName","featuredImageId","categoryIds","tags","seoTitle","seoDescription","seoImageId","id","status","publishedAt","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"put":{"operationId":"admin.blog.update","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"object","properties":{"handle":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"excerpt":{"type":"string"},"authorName":{"type":"string"},"featuredImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"categoryIds":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["handle","title","body","excerpt","authorName","featuredImageId","categoryIds","tags","seoTitle","seoDescription","seoImageId"]}},"required":["payload"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"handle":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"excerpt":{"type":"string"},"authorName":{"type":"string"},"featuredImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"categoryIds":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"status":{"enum":["draft","published","deleted"],"type":"string"},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["handle","title","body","excerpt","authorName","featuredImageId","categoryIds","tags","seoTitle","seoDescription","seoImageId","id","status","publishedAt","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.blog.remove","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"const":true}},"required":["updated"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/blog/{id}/publish":{"post":{"operationId":"admin.blog.publish","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"handle":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"excerpt":{"type":"string"},"authorName":{"type":"string"},"featuredImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"categoryIds":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"status":{"enum":["draft","published","deleted"],"type":"string"},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["handle","title","body","excerpt","authorName","featuredImageId","categoryIds","tags","seoTitle","seoDescription","seoImageId","id","status","publishedAt","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/blog/{id}/unpublish":{"post":{"operationId":"admin.blog.unpublish","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"const":true}},"required":["updated"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/blog-categories":{"get":{"operationId":"admin.blog.categories","tags":["Admin — Content & Reviews"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"handle":{"type":"string"},"id":{"type":"string"}},"required":["name","handle","id"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"post":{"operationId":"admin.blog.createCategory","tags":["Admin — Content & Reviews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"handle":{"type":"string"}},"required":["name","handle"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"handle":{"type":"string"},"id":{"type":"string"}},"required":["name","handle","id"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/blog-categories/{id}":{"put":{"operationId":"admin.blog.updateCategory","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"handle":{"type":"string"}},"required":["name","handle"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"handle":{"type":"string"},"id":{"type":"string"}},"required":["name","handle","id"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.blog.removeCategory","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"const":true}},"required":["updated"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/reviews":{"get":{"operationId":"admin.reviews.list","tags":["Admin — Content & Reviews"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["pending","approved","rejected"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"productId","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"rating","in":"query","schema":{"type":"number"},"allowEmptyValue":true,"allowReserved":true},{"name":"withPhotos","in":"query","schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"notReplied","in":"query","schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"held","in":"query","schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"displayName":{"type":"string"},"rating":{"type":"number"},"title":{"type":"string"},"body":{"type":"string"},"id":{"type":"string"},"productId":{"type":"string"},"verifiedPurchase":{"const":true},"reply":{"anyOf":[{"type":"string"},{"type":"null"}]},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"fit":{"anyOf":[{"enum":["small","true","large"],"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"hidden":{"type":"boolean"}},"required":["id","url","width","height","hidden"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"showCity":{"type":"boolean"},"holdReason":{"anyOf":[{"enum":["contact_details","blocked_word","edited_after_hide"],"type":"string"},{"type":"null"}]},"publishAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"hideReason":{"anyOf":[{"enum":["personal_details","abusive","off_topic","spam","other"],"type":"string"},{"type":"null"}]},"orderId":{"type":"string"},"orderLineId":{"type":"string"},"status":{"enum":["pending","approved","rejected","deleted"],"type":"string"},"revision":{"type":"number"},"moderationReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"product":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","title","imageUrl"]}},"required":["displayName","rating","title","body","id","productId","verifiedPurchase","reply","variantTitle","fit","city","photos","createdAt","updatedAt","showCity","holdReason","publishAt","publishedAt","hideReason","orderId","orderLineId","status","revision","moderationReason","product"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/reviews/{id}/photos/{photoId}":{"put":{"operationId":"admin.reviews.photo","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"photoId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hidden":{"type":"boolean"}},"required":["hidden"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string"},"rating":{"type":"number"},"title":{"type":"string"},"body":{"type":"string"},"id":{"type":"string"},"productId":{"type":"string"},"verifiedPurchase":{"const":true},"reply":{"anyOf":[{"type":"string"},{"type":"null"}]},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"fit":{"anyOf":[{"enum":["small","true","large"],"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"hidden":{"type":"boolean"}},"required":["id","url","width","height","hidden"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"showCity":{"type":"boolean"},"holdReason":{"anyOf":[{"enum":["contact_details","blocked_word","edited_after_hide"],"type":"string"},{"type":"null"}]},"publishAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"hideReason":{"anyOf":[{"enum":["personal_details","abusive","off_topic","spam","other"],"type":"string"},{"type":"null"}]},"orderId":{"type":"string"},"orderLineId":{"type":"string"},"status":{"enum":["pending","approved","rejected","deleted"],"type":"string"},"revision":{"type":"number"},"moderationReason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["displayName","rating","title","body","id","productId","verifiedPurchase","reply","variantTitle","fit","city","photos","createdAt","updatedAt","showCity","holdReason","publishAt","publishedAt","hideReason","orderId","orderLineId","status","revision","moderationReason"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/reviews/stats":{"get":{"operationId":"admin.reviews.stats","tags":["Admin — Content & Reviews"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pending":{"type":"number"},"approved":{"type":"number"},"rejected":{"type":"number"},"average":{"anyOf":[{"type":"number"},{"type":"null"}]},"replied":{"type":"number"}},"required":["pending","approved","rejected","average","replied"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/reviews/{id}":{"put":{"operationId":"admin.reviews.moderate","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"number"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"hideReason":{"enum":["personal_details","abusive","off_topic","spam","other"],"type":"string"},"reason":{"type":"string"},"reply":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["revision","status","reply"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string"},"rating":{"type":"number"},"title":{"type":"string"},"body":{"type":"string"},"id":{"type":"string"},"productId":{"type":"string"},"verifiedPurchase":{"const":true},"reply":{"anyOf":[{"type":"string"},{"type":"null"}]},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"fit":{"anyOf":[{"enum":["small","true","large"],"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"hidden":{"type":"boolean"}},"required":["id","url","width","height","hidden"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"showCity":{"type":"boolean"},"holdReason":{"anyOf":[{"enum":["contact_details","blocked_word","edited_after_hide"],"type":"string"},{"type":"null"}]},"publishAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"hideReason":{"anyOf":[{"enum":["personal_details","abusive","off_topic","spam","other"],"type":"string"},{"type":"null"}]},"orderId":{"type":"string"},"orderLineId":{"type":"string"},"status":{"enum":["pending","approved","rejected","deleted"],"type":"string"},"revision":{"type":"number"},"moderationReason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["displayName","rating","title","body","id","productId","verifiedPurchase","reply","variantTitle","fit","city","photos","createdAt","updatedAt","showCity","holdReason","publishAt","publishedAt","hideReason","orderId","orderLineId","status","revision","moderationReason"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.reviews.remove","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"const":true}},"required":["updated"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/reviews/requests":{"get":{"operationId":"admin.reviews.requests","tags":["Admin — Content & Reviews"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["queued","sending","sent","due","skipped","failed"],"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"orderNumber":{"type":"number"},"buyerName":{"type":"string"},"status":{"enum":["queued","sending","sent","due","skipped","failed"],"type":"string"},"channel":{"anyOf":[{"enum":["email","message"],"type":"string"},{"type":"null"}]},"skipReason":{"anyOf":[{"enum":["turned_off","opted_out","cancelled","returned","reviewed","recently_asked"],"type":"string"},{"type":"null"}]},"dueReason":{"anyOf":[{"enum":["no_email","email_unavailable","suppressed"],"type":"string"},{"type":"null"}]},"sentAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"remindedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"reviews":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","orderId","orderNumber","buyerName","status","channel","skipReason","dueReason","sentAt","remindedAt","reviews","createdAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/reviews/requests/stats":{"get":{"operationId":"admin.reviews.requestStats","tags":["Admin — Content & Reviews"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sent":{"type":"number"},"reviewed":{"type":"number"},"due":{"type":"number"}},"required":["sent","reviewed","due"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/review-settings":{"get":{"operationId":"admin.reviews.settings","tags":["Admin — Content & Reviews"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"requestsEnabled":{"type":"boolean"},"requestDelayDays":{"type":"number"},"reminderDelayDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"publishMode":{"enum":["manual","reply_window","immediate"],"type":"string"},"replyWindowHours":{"type":"number"},"holdContactDetails":{"type":"boolean"},"blockedWords":{"type":"array","items":{"type":"string"}},"fitQuestion":{"type":"boolean"}},"required":["requestsEnabled","requestDelayDays","reminderDelayDays","publishMode","replyWindowHours","holdContactDetails","blockedWords","fitQuestion"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"put":{"operationId":"admin.reviews.updateSettings","tags":["Admin — Content & Reviews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestsEnabled":{"type":"boolean"},"requestDelayDays":{"type":"number"},"reminderDelayDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"publishMode":{"enum":["manual","reply_window","immediate"],"type":"string"},"replyWindowHours":{"type":"number"},"holdContactDetails":{"type":"boolean"},"blockedWords":{"type":"array","items":{"type":"string"}},"fitQuestion":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"requestsEnabled":{"type":"boolean"},"requestDelayDays":{"type":"number"},"reminderDelayDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"publishMode":{"enum":["manual","reply_window","immediate"],"type":"string"},"replyWindowHours":{"type":"number"},"holdContactDetails":{"type":"boolean"},"blockedWords":{"type":"array","items":{"type":"string"}},"fitQuestion":{"type":"boolean"}},"required":["requestsEnabled","requestDelayDays","reminderDelayDays","publishMode","replyWindowHours","holdContactDetails","blockedWords","fitQuestion"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/messages":{"get":{"operationId":"admin.messages.list","tags":["Admin — Content & Reviews"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["open","resolved","archived"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"unread","in":"query","schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"id":{"type":"string"},"status":{"enum":["open","resolved","deleted"],"type":"string"},"readAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"consentAt":{"type":"string","format":"date-time","x-native-type":"date"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["name","email","phone","subject","body","id","status","readAt","consentAt","createdAt","updatedAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/messages/{id}":{"get":{"operationId":"admin.messages.get","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"id":{"type":"string"},"status":{"enum":["open","resolved","deleted"],"type":"string"},"readAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"consentAt":{"type":"string","format":"date-time","x-native-type":"date"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"body":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","body","createdAt"]}}},"required":["name","email","phone","subject","body","id","status","readAt","consentAt","createdAt","updatedAt","notes"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"put":{"operationId":"admin.messages.update","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"read":{"type":"boolean"},"status":{"enum":["open","resolved"],"type":"string"}},"required":["read","status"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"const":true}},"required":["updated"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.messages.remove","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"const":true}},"required":["updated"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/messages/{id}/notes":{"post":{"operationId":"admin.messages.addNote","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string"}},"required":["body"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"const":true}},"required":["updated"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/messages/{id}/restore":{"post":{"operationId":"admin.messages.restore","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"const":true}},"required":["updated"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/documents":{"get":{"operationId":"admin.site.documents.list","summary":"List site documents","tags":["Admin — Online Store & Site"],"parameters":[{"name":"kind","in":"query","schema":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"pageType","in":"query","schema":{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"includeRetired","in":"query","schema":{"type":"boolean","default":false},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"handle":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"pageType":{"anyOf":[{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},{"type":"null"}]},"draftVersion":{"type":"number"},"hasDraft":{"type":"boolean"},"publishedRevisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"retired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","handle","title","pageType","draftVersion","hasDraft","publishedRevisionId","retired","createdAt","updatedAt"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"post":{"operationId":"admin.site.documents.create","summary":"Create a document","description":"Creates a document of `kind` from `document`, or a minimal valid one when omitted. A store has one theme, layout, assignments and code document.","tags":["Admin — Online Store & Site"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["kind"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"handle":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"pageType":{"anyOf":[{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},{"type":"null"}]},"draftVersion":{"type":"number"},"hasDraft":{"type":"boolean"},"publishedRevisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"retired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"draft":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}},"warnings":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}},"required":["id","kind","handle","title","pageType","draftVersion","hasDraft","publishedRevisionId","retired","createdAt","updatedAt","draft"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/documents/{id}":{"get":{"operationId":"admin.site.documents.get","summary":"Get a document with its draft","tags":["Admin — Online Store & Site"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"includeRetired","in":"query","schema":{"type":"boolean","default":false},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"handle":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"pageType":{"anyOf":[{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},{"type":"null"}]},"draftVersion":{"type":"number"},"hasDraft":{"type":"boolean"},"publishedRevisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"retired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"draft":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}},"warnings":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}},"required":["id","kind","handle","title","pageType","draftVersion","hasDraft","publishedRevisionId","retired","createdAt","updatedAt","draft"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/documents/{id}/draft":{"put":{"operationId":"admin.site.documents.saveDraft","summary":"Save the shared draft","description":"Replaces the document's one shared draft. `baseVersion` is the `draftVersion` the editor started from; a newer save in between answers 409 with `currentVersion`.","tags":["Admin — Online Store & Site"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"baseVersion":{"type":"number"},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["baseVersion","document"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"handle":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"pageType":{"anyOf":[{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},{"type":"null"}]},"draftVersion":{"type":"number"},"hasDraft":{"type":"boolean"},"publishedRevisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"retired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"draft":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}},"warnings":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}},"required":["id","kind","handle","title","pageType","draftVersion","hasDraft","publishedRevisionId","retired","createdAt","updatedAt","draft"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/documents/{id}/discard":{"post":{"operationId":"admin.site.documents.discardDraft","summary":"Discard unpublished changes","tags":["Admin — Online Store & Site"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"baseVersion":{"type":"number"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"handle":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"pageType":{"anyOf":[{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},{"type":"null"}]},"draftVersion":{"type":"number"},"hasDraft":{"type":"boolean"},"publishedRevisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"retired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"draft":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}},"warnings":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}},"required":["id","kind","handle","title","pageType","draftVersion","hasDraft","publishedRevisionId","retired","createdAt","updatedAt","draft"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/documents/{id}/retire":{"post":{"operationId":"admin.site.documents.retire","summary":"Retire a document","description":"Soft-deletes the document. Refused with 409 and `usedBy` while other documents use it, unless `force`. It leaves the live site with the next publish.","tags":["Admin — Online Store & Site"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"force":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"handle":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"pageType":{"anyOf":[{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},{"type":"null"}]},"draftVersion":{"type":"number"},"hasDraft":{"type":"boolean"},"publishedRevisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"retired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","handle","title","pageType","draftVersion","hasDraft","publishedRevisionId","retired","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/documents/{id}/restore":{"post":{"operationId":"admin.site.documents.restoreRevision","summary":"Restore an earlier revision as the draft","tags":["Admin — Online Store & Site"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revisionId":{"type":"string"},"baseVersion":{"type":"number"}},"required":["revisionId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"handle":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"pageType":{"anyOf":[{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},{"type":"null"}]},"draftVersion":{"type":"number"},"hasDraft":{"type":"boolean"},"publishedRevisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"retired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"draft":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}},"warnings":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}},"required":["id","kind","handle","title","pageType","draftVersion","hasDraft","publishedRevisionId","retired","createdAt","updatedAt","draft"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/documents/{id}/usages":{"get":{"operationId":"admin.site.documents.usages","summary":"List documents that use one","tags":["Admin — Online Store & Site"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/documents/{id}/revisions":{"get":{"operationId":"admin.site.revisions.list","summary":"List a document's revisions","tags":["Admin — Online Store & Site"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"number","default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"beforeNumber","in":"query","schema":{"type":"number"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"source":{"enum":["editor","ai","import","restore","template","migration"],"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentHash":{"type":"string"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"live":{"type":"boolean"}},"required":["id","number","source","label","contentHash","createdBy","createdAt","live"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/documents/{id}/revisions/{revisionId}":{"get":{"operationId":"admin.site.revisions.get","summary":"Get one revision with its content","tags":["Admin — Online Store & Site"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"source":{"enum":["editor","ai","import","restore","template","migration"],"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentHash":{"type":"string"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"live":{"type":"boolean"},"content":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","number","source","label","contentHash","createdBy","createdAt","live","content"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/releases":{"get":{"operationId":"admin.site.releases.list","summary":"List releases, newest first","tags":["Admin — Online Store & Site"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"beforeNumber","in":"query","schema":{"type":"number"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"kind":{"enum":["publish","rollback"],"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"changes":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string"},"change":{"enum":["added","updated","removed"],"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["documentId","change","revisionId"]}},"previousReleaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackOfReleaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activatedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"live":{"type":"boolean"}},"required":["id","number","kind","label","changes","previousReleaseId","rollbackOfReleaseId","activatedAt","createdBy","createdAt","live"]}},"liveReleaseId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","liveReleaseId"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/releases/{id}":{"get":{"operationId":"admin.site.releases.get","summary":"Get a release with its manifest","tags":["Admin — Online Store & Site"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"kind":{"enum":["publish","rollback"],"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"changes":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string"},"change":{"enum":["added","updated","removed"],"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["documentId","change","revisionId"]}},"previousReleaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackOfReleaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activatedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"live":{"type":"boolean"},"entries":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string"},"revisionId":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"pageType":{"anyOf":[{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},{"type":"null"}]},"handle":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"revisionNumber":{"type":"number"}},"required":["documentId","revisionId","kind","pageType","handle","title","revisionNumber"]}}},"required":["id","number","kind","label","changes","previousReleaseId","rollbackOfReleaseId","activatedAt","createdBy","createdAt","live","entries"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/dependencies":{"post":{"operationId":"admin.site.dependencies","summary":"Everything a selection of documents needs","description":"The transitive dependency closure of `documentIds`, through drafts (`mode: draft`) or the live release. `site` adds the theme, layout, assignments and code documents.","tags":["Admin — Online Store & Site"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string"}},"mode":{"enum":["draft","live"],"type":"string","default":"draft"},"site":{"type":"boolean","default":false}},"required":["documentIds"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"},"pageType":{"anyOf":[{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},{"type":"null"}]},"live":{"type":"boolean"},"hasDraft":{"type":"boolean"},"requested":{"type":"boolean"}},"required":["id","kind","title","pageType","live","hasDraft","requested"]}},"missing":{"type":"array","items":{"type":"string"}}},"required":["documents","missing"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/publish":{"post":{"operationId":"admin.site.publish","summary":"Publish drafts as a release","description":"Publishes the selected drafts, plus anything they need that is not live yet, as one new release in one transaction. `versions` maps document ids to the `draftVersion` that was reviewed; a newer save answers 409.","tags":["Admin — Online Store & Site"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string"}},"versions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"label":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["documentIds"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"release":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"kind":{"enum":["publish","rollback"],"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"changes":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string"},"change":{"enum":["added","updated","removed"],"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["documentId","change","revisionId"]}},"previousReleaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackOfReleaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activatedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","kind","label","changes","previousReleaseId","rollbackOfReleaseId","activatedAt","createdBy","createdAt"]},"addedDependencies":{"type":"array","items":{"type":"string"}}},"required":["release","addedDependencies"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/rollback":{"post":{"operationId":"admin.site.rollback","summary":"Make an earlier release live again","description":"Creates a new release from an earlier one's entries, leaving out documents retired since. Drafts with unpublished changes keep them.","tags":["Admin — Online Store & Site"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"releaseId":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["releaseId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"kind":{"enum":["publish","rollback"],"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"changes":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string"},"change":{"enum":["added","updated","removed"],"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["documentId","change","revisionId"]}},"previousReleaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackOfReleaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activatedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","kind","label","changes","previousReleaseId","rollbackOfReleaseId","activatedAt","createdBy","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/registry":{"get":{"operationId":"admin.site.registry","summary":"Section and block definitions for the editor","description":"Inspector schemas and presets for every built-in definition and the store's components, plus the field catalogue, page types and bindable context.","tags":["Admin — Online Store & Site"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"definitions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"kind":{"enum":["section","block","component"],"type":"string"},"label":{"type":"string"},"version":{"type":"number"},"tabs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"presets":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["type","kind","label","version","tabs","presets"],"additionalProperties":{}}},"components":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"kind":{"enum":["section","block","component"],"type":"string"},"label":{"type":"string"},"version":{"type":"number"},"tabs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"presets":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["type","kind","label","version","tabs","presets"],"additionalProperties":{}}},"fields":{"type":"object","properties":{"kinds":{"type":"array","items":{"type":"string"}},"responsive":{"type":"array","items":{"type":"string"}},"bindable":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"templates":{"type":"array","items":{"type":"string"}},"codeLanguages":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"string"}}},"required":["kinds","responsive","bindable","templates","codeLanguages","tabs"]},"pageTypes":{"type":"array","items":{"type":"object","properties":{"pageType":{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},"main":{"type":"boolean"},"context":{"type":"array","items":{"type":"string"}},"rules":{"type":"boolean"}},"required":["pageType","main","context","rules"]}},"context":{"type":"object","properties":{"globals":{"type":"array","items":{"type":"string"}},"shapes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"bindCompatibility":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["globals","shapes","bindCompatibility"]},"versions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}}},"required":["definitions","components","fields","pageTypes","context","versions"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/preview-resolve":{"get":{"operationId":"admin.site.previewResolve","summary":"Resolve a route from drafts","description":"Resolves a route like the storefront does, but from the current drafts instead of the live release. For the editor; never cached.","tags":["Admin — Online Store & Site"],"parameters":[{"name":"pageType","in":"query","required":true,"schema":{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"handle","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"id","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"templateId","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"release":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"}},"required":["id","number"]},{"type":"null"}]},"preview":{"type":"boolean"},"pageType":{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},"template":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]},{"type":"null"}]},"templateChoice":{"anyOf":[{"type":"object","properties":{"templateId":{"type":"string"},"source":{"const":"explicit"}},"required":["templateId","source"]},{"type":"object","properties":{"templateId":{"type":"string"},"source":{"const":"rule"},"ruleId":{"type":"string"}},"required":["templateId","source","ruleId"]},{"type":"object","properties":{"templateId":{"type":"string"},"source":{"const":"default"}},"required":["templateId","source"]},{"type":"object","properties":{"templateId":{"type":"null"},"source":{"const":"none"}},"required":["templateId","source"]}]},"page":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]},{"type":"null"}]},"layout":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]},{"type":"null"}]},"theme":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]},{"type":"null"}]},"code":{"anyOf":[{"type":"object","properties":{"css":{"type":"string"},"snippets":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["css","snippets"]},{"type":"null"}]},"customCode":{"enum":["on","paused","blocked","off"],"type":"string"},"components":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]}},"menus":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]}},"resource":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"const":"product"},"product":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}},"required":["kind","product"]},{"type":"object","properties":{"kind":{"const":"collection"},"collection":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","alt","width","height"]},{"type":"null"}]},"productsCount":{"type":"number"}},"required":["id","slug","title","description","url","image","productsCount"]}},"required":["kind","collection"]},{"type":"object","properties":{"kind":{"const":"page"},"id":{"type":"string"}},"required":["kind","id"]},{"type":"object","properties":{"kind":{"const":"article"},"article":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"meta":{"type":"object","properties":{"author":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"excerpt":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"coverImage":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"alt":{"type":"string"},"focal":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]},"decorative":{"type":"boolean"}},"required":["asset"],"additionalProperties":false},{"type":"null"}]}},"required":["author","publishedAt","tags"],"additionalProperties":false}},"required":["id","handle","title","url","meta"]}},"required":["kind","article"]}]},{"type":"null"}]},"context":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"object","properties":{"source":{"const":"products"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"product"},"item":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]},{"type":"null"}]}},"required":["source","item"]},{"type":"object","properties":{"source":{"const":"collections"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","alt","width","height"]},{"type":"null"}]},"productsCount":{"type":"number"}},"required":["id","slug","title","description","url","image","productsCount"]}}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"collection"},"item":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","alt","width","height"]},{"type":"null"}]},"productsCount":{"type":"number"}},"required":["id","slug","title","description","url","image","productsCount"]},{"type":"null"}]}},"required":["source","item"]},{"type":"object","properties":{"source":{"const":"articles"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"meta":{"type":"object","properties":{"author":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"excerpt":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"coverImage":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"alt":{"type":"string"},"focal":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]},"decorative":{"type":"boolean"}},"required":["asset"],"additionalProperties":false},{"type":"null"}]}},"required":["author","publishedAt","tags"],"additionalProperties":false}},"required":["id","handle","title","url","meta"]}}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"menu"},"item":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":"string"},"name":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"items":{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}},"required":["id","label","url","items"],"additionalProperties":{}}}},"required":["id","label","url","items"],"additionalProperties":{}}}},"required":["id","handle","name","items"]},{"type":"null"}]}},"required":["source","item"]},{"type":"object","properties":{"source":{"const":"reviews"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"productId":{"type":"string"},"displayName":{"type":"string"},"rating":{"type":"number"},"title":{"type":"string"},"body":{"type":"string"},"reply":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"product":{"anyOf":[{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"}},"required":["title","url"]},{"type":"null"}]},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"fit":{"anyOf":[{"enum":["small","true","large"],"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"}},"required":["id","url","width","height"]}}},"required":["id","productId","displayName","rating","title","body","reply","createdAt"]}},"summary":{"type":"object","properties":{"count":{"type":"number"},"average":{"anyOf":[{"type":"number"},{"type":"null"}]},"histogram":{"type":"array","items":{"type":"number"}},"fit":{"anyOf":[{"type":"object","properties":{"small":{"type":"number"},"true":{"type":"number"},"large":{"type":"number"}},"required":["small","true","large"]},{"type":"null"}]},"withPhotos":{"type":"number"}},"required":["count","average","histogram","fit","withPhotos"]},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"faqs"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"answer":{"type":"string"},"group":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","question","answer","group"],"additionalProperties":false}}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"booking"},"item":{"type":"object","properties":{"available":{"type":"boolean"},"timezone":{"type":"string"},"windowDays":{"type":"number"},"cancelWindowHours":{"type":"number"},"customerCanReschedule":{"type":"boolean"},"customerCanCancel":{"type":"boolean"},"policyText":{"type":"string"},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"number"},"opens":{"type":"string"},"closes":{"type":"string"}},"required":["weekday","opens","closes"]}},"specialDates":{"type":"array","items":{"type":"object","properties":{"startsOn":{"type":"string"},"endsOn":{"type":"string"},"closed":{"type":"boolean"},"opens":{"anyOf":[{"type":"string"},{"type":"null"}]},"closes":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"}},"required":["startsOn","endsOn","closed","opens","closes","label"]}},"staff":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"colourIndex":{"type":"number"},"photoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"productIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","title","colourIndex","photoUrl","productIds"]}},"services":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"staffChoice":{"enum":["choose","any_only","hidden"],"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"durationMin":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["variantId","durationMin"]}}},"required":["productId","staffChoice","variants"]}},"weekendDays":{"type":"array","items":{"type":"number"}},"sessions":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"minQuantity":{"type":"number"},"maxQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"asksParticipants":{"type":"boolean"},"tickets":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"takesPlace":{"type":"boolean"},"weekendPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"minAge":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxAge":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["variantId","takesPlace","weekendPricePaisa","minAge","maxAge"]}},"schedule":{"type":"array","items":{"type":"object","properties":{"weekdays":{"type":"array","items":{"type":"number"}},"startTimes":{"type":"array","items":{"type":"string"}},"durationMin":{"type":"number"}},"required":["weekdays","startTimes","durationMin"]}}},"required":["productId","minQuantity","maxQuantity","asksParticipants","tickets","schedule"]}},"packages":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"includedGuests":{"anyOf":[{"type":"number"},{"type":"null"}]},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"durationMin":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["variantId","durationMin"]}}},"required":["productId","includedGuests","variants"]}},"consentText":{"type":"string"}},"required":["available","timezone","windowDays","cancelWindowHours","customerCanReschedule","customerCanCancel","policyText","hours","specialDates","staff","services","weekendDays","sessions","packages","consentText"]}},"required":["source","item"]}]}},"media":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","alt","width","height"]}},"links":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"}},"required":["title","url"]}},"expressions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"errors":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"setting":{"type":"string"},"message":{"type":"string"}},"required":["address","setting","message"]}}},"required":["values","errors"]}}},"required":["release","preview","pageType","template","templateChoice","page","layout","theme","code","customCode","components","menus","resource","context","data","media","links","expressions"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/map":{"get":{"operationId":"admin.site.map","summary":"Every page of the site, for the canvas","description":"Pages, templates, the layout, menus, assignments and the theme with their drafts, and the product and collection that product and collection pages are shown with. For the AI editor's canvas (SPEC-81a); never cached.","tags":["Admin — Online Store & Site"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"handle":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"pageType":{"anyOf":[{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},{"type":"null"}]},"draftVersion":{"type":"number"},"hasDraft":{"type":"boolean"},"publishedRevisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"retired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"draft":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}},"warnings":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}},"required":["id","kind","handle","title","pageType","draftVersion","hasDraft","publishedRevisionId","retired","createdAt","updatedAt","draft"]}},"samples":{"type":"object","properties":{"product":{"anyOf":[{"type":"string"},{"type":"null"}]},"collection":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["product","collection"]}},"required":["documents","samples"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/library-preview":{"get":{"operationId":"admin.site.libraryPreview","summary":"Preview every library section with the store's data","description":"One route, resolved from the current drafts like `previewResolve`, whose template holds every insertable section preset and the store's saved sections. For the editor's library thumbnails; never cached.","tags":["Admin — Online Store & Site"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"route":{"type":"object","properties":{"release":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"}},"required":["id","number"]},{"type":"null"}]},"preview":{"type":"boolean"},"pageType":{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},"template":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]},{"type":"null"}]},"templateChoice":{"anyOf":[{"type":"object","properties":{"templateId":{"type":"string"},"source":{"const":"explicit"}},"required":["templateId","source"]},{"type":"object","properties":{"templateId":{"type":"string"},"source":{"const":"rule"},"ruleId":{"type":"string"}},"required":["templateId","source","ruleId"]},{"type":"object","properties":{"templateId":{"type":"string"},"source":{"const":"default"}},"required":["templateId","source"]},{"type":"object","properties":{"templateId":{"type":"null"},"source":{"const":"none"}},"required":["templateId","source"]}]},"page":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]},{"type":"null"}]},"layout":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]},{"type":"null"}]},"theme":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]},{"type":"null"}]},"code":{"anyOf":[{"type":"object","properties":{"css":{"type":"string"},"snippets":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["css","snippets"]},{"type":"null"}]},"customCode":{"enum":["on","paused","blocked","off"],"type":"string"},"components":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]}},"menus":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]}},"resource":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"const":"product"},"product":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}},"required":["kind","product"]},{"type":"object","properties":{"kind":{"const":"collection"},"collection":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","alt","width","height"]},{"type":"null"}]},"productsCount":{"type":"number"}},"required":["id","slug","title","description","url","image","productsCount"]}},"required":["kind","collection"]},{"type":"object","properties":{"kind":{"const":"page"},"id":{"type":"string"}},"required":["kind","id"]},{"type":"object","properties":{"kind":{"const":"article"},"article":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"meta":{"type":"object","properties":{"author":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"excerpt":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"coverImage":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"alt":{"type":"string"},"focal":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]},"decorative":{"type":"boolean"}},"required":["asset"],"additionalProperties":false},{"type":"null"}]}},"required":["author","publishedAt","tags"],"additionalProperties":false}},"required":["id","handle","title","url","meta"]}},"required":["kind","article"]}]},{"type":"null"}]},"context":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"object","properties":{"source":{"const":"products"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{},"value":{},"colour":{},"position":{}}}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{},"optionName":{},"valueId":{},"value":{}}}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"product"},"item":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]},{"type":"null"}]}},"required":["source","item"]},{"type":"object","properties":{"source":{"const":"collections"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","alt","width","height"]},{"type":"null"}]},"productsCount":{"type":"number"}},"required":["id","slug","title","description","url","image","productsCount"]}}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"collection"},"item":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","alt","width","height"]},{"type":"null"}]},"productsCount":{"type":"number"}},"required":["id","slug","title","description","url","image","productsCount"]},{"type":"null"}]}},"required":["source","item"]},{"type":"object","properties":{"source":{"const":"articles"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"meta":{"type":"object","properties":{"author":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"excerpt":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"coverImage":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"alt":{"type":"string"},"focal":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]},"decorative":{"type":"boolean"}},"required":["asset"],"additionalProperties":false},{"type":"null"}]}},"required":["author","publishedAt","tags"],"additionalProperties":false}},"required":["id","handle","title","url","meta"]}}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"menu"},"item":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":"string"},"name":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"items":{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}},"required":["id","label","url","items"],"additionalProperties":{}}}},"required":["id","label","url","items"],"additionalProperties":{}}}},"required":["id","handle","name","items"]},{"type":"null"}]}},"required":["source","item"]},{"type":"object","properties":{"source":{"const":"reviews"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"productId":{"type":"string"},"displayName":{"type":"string"},"rating":{"type":"number"},"title":{"type":"string"},"body":{"type":"string"},"reply":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"product":{"anyOf":[{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"}},"required":["title","url"]},{"type":"null"}]},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"fit":{"anyOf":[{"enum":["small","true","large"],"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"}},"required":["id","url","width","height"]}}},"required":["id","productId","displayName","rating","title","body","reply","createdAt"]}},"summary":{"type":"object","properties":{"count":{"type":"number"},"average":{"anyOf":[{"type":"number"},{"type":"null"}]},"histogram":{"type":"array","items":{"type":"number"}},"fit":{"anyOf":[{"type":"object","properties":{"small":{"type":"number"},"true":{"type":"number"},"large":{"type":"number"}},"required":["small","true","large"]},{"type":"null"}]},"withPhotos":{"type":"number"}},"required":["count","average","histogram","fit","withPhotos"]},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"faqs"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"answer":{"type":"string"},"group":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","question","answer","group"],"additionalProperties":false}}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"booking"},"item":{"type":"object","properties":{"available":{"type":"boolean"},"timezone":{"type":"string"},"windowDays":{"type":"number"},"cancelWindowHours":{"type":"number"},"customerCanReschedule":{"type":"boolean"},"customerCanCancel":{"type":"boolean"},"policyText":{"type":"string"},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"number"},"opens":{"type":"string"},"closes":{"type":"string"}},"required":["weekday","opens","closes"]}},"specialDates":{"type":"array","items":{"type":"object","properties":{"startsOn":{"type":"string"},"endsOn":{"type":"string"},"closed":{"type":"boolean"},"opens":{"anyOf":[{"type":"string"},{"type":"null"}]},"closes":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"}},"required":["startsOn","endsOn","closed","opens","closes","label"]}},"staff":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"colourIndex":{"type":"number"},"photoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"productIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","title","colourIndex","photoUrl","productIds"]}},"services":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"staffChoice":{"enum":["choose","any_only","hidden"],"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"durationMin":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["variantId","durationMin"]}}},"required":["productId","staffChoice","variants"]}},"weekendDays":{"type":"array","items":{"type":"number"}},"sessions":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"minQuantity":{"type":"number"},"maxQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"asksParticipants":{"type":"boolean"},"tickets":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"takesPlace":{"type":"boolean"},"weekendPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"minAge":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxAge":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["variantId","takesPlace","weekendPricePaisa","minAge","maxAge"]}},"schedule":{"type":"array","items":{"type":"object","properties":{"weekdays":{"type":"array","items":{"anyOf":[{},{"type":"null"}]}},"startTimes":{"type":"array","items":{"anyOf":[{},{"type":"null"}]}},"durationMin":{"type":"number"}},"required":["weekdays","startTimes","durationMin"]}}},"required":["productId","minQuantity","maxQuantity","asksParticipants","tickets","schedule"]}},"packages":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"includedGuests":{"anyOf":[{"type":"number"},{"type":"null"}]},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"durationMin":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["variantId","durationMin"]}}},"required":["productId","includedGuests","variants"]}},"consentText":{"type":"string"}},"required":["available","timezone","windowDays","cancelWindowHours","customerCanReschedule","customerCanCancel","policyText","hours","specialDates","staff","services","weekendDays","sessions","packages","consentText"]}},"required":["source","item"]}]}},"media":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","alt","width","height"]}},"links":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"}},"required":["title","url"]}},"expressions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"errors":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"setting":{"type":"string"},"message":{"type":"string"}},"required":["address","setting","message"]}}},"required":["values","errors"]}}},"required":["release","preview","pageType","template","templateChoice","page","layout","theme","code","customCode","components","menus","resource","context","data","media","links","expressions"]},"items":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"preset":{"anyOf":[{"type":"number"},{"type":"null"}]},"componentId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["nodeId","type","preset","componentId"]}}},"required":["route","items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/catalog-facts":{"get":{"operationId":"admin.site.catalogFacts","summary":"What template rules and previews know about products, collections or posts","description":"Collections, tags, type and preview states of the store's products (or collections, or blog posts), most recently updated first, for the Templates screen's live counts and the template preview's product picker.","tags":["Admin — Online Store & Site"],"parameters":[{"name":"kind","in":"query","required":true,"schema":{"enum":["product","collection","article"],"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"status":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"collectionIds":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasVariants":{"type":"boolean"},"onSale":{"type":"boolean"},"soldOut":{"type":"boolean"},"reviewCount":{"type":"number"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","title","handle","status","imageUrl","collectionIds","tags","productType","hasVariants","onSale","soldOut","reviewCount","updatedAt"]}},"truncated":{"type":"boolean"}},"required":["items","truncated"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/component-preview":{"get":{"operationId":"admin.site.componentPreview","summary":"Preview one of the store's own sections with real data","description":"Places the section's current draft on a page of its kind — with the chosen product, collection or post, or the most recent one — and resolves it from drafts like `previewResolve`. For My sections' live preview; never cached.","tags":["Admin — Online Store & Site"],"parameters":[{"name":"componentId","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"resourceId","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"release":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"}},"required":["id","number"]},{"type":"null"}]},"preview":{"type":"boolean"},"pageType":{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},"template":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]},{"type":"null"}]},"templateChoice":{"anyOf":[{"type":"object","properties":{"templateId":{"type":"string"},"source":{"const":"explicit"}},"required":["templateId","source"]},{"type":"object","properties":{"templateId":{"type":"string"},"source":{"const":"rule"},"ruleId":{"type":"string"}},"required":["templateId","source","ruleId"]},{"type":"object","properties":{"templateId":{"type":"string"},"source":{"const":"default"}},"required":["templateId","source"]},{"type":"object","properties":{"templateId":{"type":"null"},"source":{"const":"none"}},"required":["templateId","source"]}]},"page":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]},{"type":"null"}]},"layout":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]},{"type":"null"}]},"theme":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]},{"type":"null"}]},"code":{"anyOf":[{"type":"object","properties":{"css":{"type":"string"},"snippets":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["css","snippets"]},{"type":"null"}]},"customCode":{"enum":["on","paused","blocked","off"],"type":"string"},"components":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]}},"menus":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"document":{"type":"object","properties":{"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"schemaVersion":{"type":"number"},"defs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","schemaVersion","meta","body"],"additionalProperties":{}}},"required":["id","revisionId","document"]}},"resource":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"const":"product"},"product":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}},"required":["kind","product"]},{"type":"object","properties":{"kind":{"const":"collection"},"collection":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","alt","width","height"]},{"type":"null"}]},"productsCount":{"type":"number"}},"required":["id","slug","title","description","url","image","productsCount"]}},"required":["kind","collection"]},{"type":"object","properties":{"kind":{"const":"page"},"id":{"type":"string"}},"required":["kind","id"]},{"type":"object","properties":{"kind":{"const":"article"},"article":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"meta":{"type":"object","properties":{"author":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"excerpt":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"coverImage":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"alt":{"type":"string"},"focal":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]},"decorative":{"type":"boolean"}},"required":["asset"],"additionalProperties":false},{"type":"null"}]}},"required":["author","publishedAt","tags"],"additionalProperties":false}},"required":["id","handle","title","url","meta"]}},"required":["kind","article"]}]},{"type":"null"}]},"context":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"object","properties":{"source":{"const":"products"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"product"},"item":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]},{"type":"null"}]}},"required":["source","item"]},{"type":"object","properties":{"source":{"const":"collections"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","alt","width","height"]},{"type":"null"}]},"productsCount":{"type":"number"}},"required":["id","slug","title","description","url","image","productsCount"]}}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"collection"},"item":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","alt","width","height"]},{"type":"null"}]},"productsCount":{"type":"number"}},"required":["id","slug","title","description","url","image","productsCount"]},{"type":"null"}]}},"required":["source","item"]},{"type":"object","properties":{"source":{"const":"articles"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"meta":{"type":"object","properties":{"author":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"excerpt":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"coverImage":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"alt":{"type":"string"},"focal":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]},"decorative":{"type":"boolean"}},"required":["asset"],"additionalProperties":false},{"type":"null"}]}},"required":["author","publishedAt","tags"],"additionalProperties":false}},"required":["id","handle","title","url","meta"]}}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"menu"},"item":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":"string"},"name":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"items":{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}},"required":["id","label","url","items"],"additionalProperties":{}}}},"required":["id","label","url","items"],"additionalProperties":{}}}},"required":["id","handle","name","items"]},{"type":"null"}]}},"required":["source","item"]},{"type":"object","properties":{"source":{"const":"reviews"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"productId":{"type":"string"},"displayName":{"type":"string"},"rating":{"type":"number"},"title":{"type":"string"},"body":{"type":"string"},"reply":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"product":{"anyOf":[{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"}},"required":["title","url"]},{"type":"null"}]},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"fit":{"anyOf":[{"enum":["small","true","large"],"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"}},"required":["id","url","width","height"]}}},"required":["id","productId","displayName","rating","title","body","reply","createdAt"]}},"summary":{"type":"object","properties":{"count":{"type":"number"},"average":{"anyOf":[{"type":"number"},{"type":"null"}]},"histogram":{"type":"array","items":{"type":"number"}},"fit":{"anyOf":[{"type":"object","properties":{"small":{"type":"number"},"true":{"type":"number"},"large":{"type":"number"}},"required":["small","true","large"]},{"type":"null"}]},"withPhotos":{"type":"number"}},"required":["count","average","histogram","fit","withPhotos"]},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"faqs"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"answer":{"type":"string"},"group":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","question","answer","group"],"additionalProperties":false}}},"required":["source","items"]},{"type":"object","properties":{"source":{"const":"booking"},"item":{"type":"object","properties":{"available":{"type":"boolean"},"timezone":{"type":"string"},"windowDays":{"type":"number"},"cancelWindowHours":{"type":"number"},"customerCanReschedule":{"type":"boolean"},"customerCanCancel":{"type":"boolean"},"policyText":{"type":"string"},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"number"},"opens":{"type":"string"},"closes":{"type":"string"}},"required":["weekday","opens","closes"]}},"specialDates":{"type":"array","items":{"type":"object","properties":{"startsOn":{"type":"string"},"endsOn":{"type":"string"},"closed":{"type":"boolean"},"opens":{"anyOf":[{"type":"string"},{"type":"null"}]},"closes":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"}},"required":["startsOn","endsOn","closed","opens","closes","label"]}},"staff":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"colourIndex":{"type":"number"},"photoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"productIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","title","colourIndex","photoUrl","productIds"]}},"services":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"staffChoice":{"enum":["choose","any_only","hidden"],"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"durationMin":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["variantId","durationMin"]}}},"required":["productId","staffChoice","variants"]}},"weekendDays":{"type":"array","items":{"type":"number"}},"sessions":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"minQuantity":{"type":"number"},"maxQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"asksParticipants":{"type":"boolean"},"tickets":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"takesPlace":{"type":"boolean"},"weekendPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"minAge":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxAge":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["variantId","takesPlace","weekendPricePaisa","minAge","maxAge"]}},"schedule":{"type":"array","items":{"type":"object","properties":{"weekdays":{"type":"array","items":{"type":"number"}},"startTimes":{"type":"array","items":{"type":"string"}},"durationMin":{"type":"number"}},"required":["weekdays","startTimes","durationMin"]}}},"required":["productId","minQuantity","maxQuantity","asksParticipants","tickets","schedule"]}},"packages":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"includedGuests":{"anyOf":[{"type":"number"},{"type":"null"}]},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"durationMin":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["variantId","durationMin"]}}},"required":["productId","includedGuests","variants"]}},"consentText":{"type":"string"}},"required":["available","timezone","windowDays","cancelWindowHours","customerCanReschedule","customerCanCancel","policyText","hours","specialDates","staff","services","weekendDays","sessions","packages","consentText"]}},"required":["source","item"]}]}},"media":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","alt","width","height"]}},"links":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"}},"required":["title","url"]}},"expressions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"errors":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"setting":{"type":"string"},"message":{"type":"string"}},"required":["address","setting","message"]}}},"required":["values","errors"]}}},"required":["release","preview","pageType","template","templateChoice","page","layout","theme","code","customCode","components","menus","resource","context","data","media","links","expressions"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/custom-code":{"get":{"operationId":"admin.site.customCode.get","summary":"Custom code switches","tags":["Admin — Online Store & Site"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"paused":{"type":"boolean"},"blocked":{"type":"boolean"},"blockedReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"canEdit":{"type":"boolean"}},"required":["paused","blocked","blockedReason","canEdit"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/custom-code/pause":{"post":{"operationId":"admin.site.customCode.setPaused","summary":"Pause or resume custom code","description":"Pausing takes every Custom HTML element, section code and site code snippet, and the store-wide CSS, off the storefront until resumed. Owners and admins only.","tags":["Admin — Online Store & Site"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"paused":{"type":"boolean"}},"required":["paused"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"paused":{"type":"boolean"},"blocked":{"type":"boolean"},"blockedReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"canEdit":{"type":"boolean"}},"required":["paused","blocked","blockedReason","canEdit"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/ai":{"get":{"operationId":"admin.site.ai.status","summary":"Which AI assists are available","tags":["Admin — Online Store & Site"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"enum":["models","local"],"type":"string"},"available":{"type":"boolean"},"reason":{"anyOf":[{"enum":["plan_feature_required","billing_suspended","allowance_used"],"type":"string"},{"type":"null"}]},"plans":{"type":"array","items":{"type":"string"}},"usedPercent":{"anyOf":[{"type":"number"},{"type":"null"}]},"resetsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lock":{"anyOf":[{"type":"object","properties":{"message":{"type":"string"},"action":{"anyOf":[{"type":"object","properties":{"label":{"type":"string"},"href":{"type":"string"}},"required":["label","href"]},{"type":"null"}]}},"required":["message","action"]},{"type":"null"}]}},"required":["provider","available","reason","plans","usedPercent","resetsAt","lock"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/ai/rewrite":{"post":{"operationId":"admin.site.ai.rewrite","summary":"Rewrite a piece of text","tags":["Admin — Online Store & Site"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"tone":{"enum":["shorter","longer","friendlier","formal","fix"],"type":"string"},"field":{"type":"string"}},"required":["text","tone"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/ai/suggest-sections":{"post":{"operationId":"admin.site.ai.suggestSections","summary":"Suggest sections for a page","tags":["Admin — Online Store & Site"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pageType":{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},"sections":{"type":"array","items":{"type":"string"}},"brief":{"type":"string"}},"required":["pageType","sections"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"suggestions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"preset":{"anyOf":[{"type":"number"},{"type":"null"}]},"reason":{"type":"string"},"text":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}},"required":["type","preset","reason","text"]}}},"required":["suggestions"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/ai/ask":{"post":{"operationId":"admin.site.ai.ask","summary":"Propose changes for a request","description":"Turns a request in the merchant's words into steps the editor applies as a preview: sections from the library, text, the brand colour or fonts.","tags":["Admin — Online Store & Site"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string"},"pageType":{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"text":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}},"required":["id","type","label","text"]}},"selectedId":{"anyOf":[{"type":"string"},{"type":"null"}]},"documentId":{"type":"string"}},"required":["prompt","pageType","sections"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"string"},"steps":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"const":"add"},"section":{"type":"object","properties":{"type":{"type":"string"},"preset":{"anyOf":[{"type":"number"},{"type":"null"}]},"reason":{"type":"string"},"text":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}},"required":["type","preset","reason","text"]},"after":{"anyOf":[{"type":"string"},{"type":"null"}]},"list":{"enum":["sections","header","footer"],"type":"string","default":"sections"},"ref":{"type":"string","default":""}},"required":["kind","section","after"]},{"type":"object","properties":{"kind":{"const":"text"},"nodeId":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"}},"required":["kind","nodeId","key","value"]},{"type":"object","properties":{"kind":{"const":"remove"},"nodeId":{"type":"string"}},"required":["kind","nodeId"]},{"type":"object","properties":{"kind":{"const":"brand"},"color":{"type":"string"}},"required":["kind","color"]},{"type":"object","properties":{"kind":{"const":"fonts"},"pairing":{"enum":["figtree","editorial","modern","classic","urban"],"type":"string"}},"required":["kind","pairing"]},{"type":"object","properties":{"kind":{"const":"settings"},"nodeId":{"type":"string"},"values":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"json":{"type":"string"}},"required":["key","json"]}}},"required":["kind","nodeId","values"]},{"type":"object","properties":{"kind":{"const":"addBlock"},"parentId":{"type":"string"},"type":{"type":"string"},"index":{"type":"number"},"ref":{"type":"string"},"values":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"json":{"type":"string"}},"required":["key","json"]}},"text":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}},"required":["kind","parentId","type","index","ref","values","text"]},{"type":"object","properties":{"kind":{"const":"move"},"nodeId":{"type":"string"},"to":{"type":"number"}},"required":["kind","nodeId","to"]},{"type":"object","properties":{"kind":{"const":"place"},"nodeId":{"type":"string"},"parentId":{"type":"string"},"list":{"enum":["sections","header","footer"],"type":"string"},"index":{"type":"number"}},"required":["kind","nodeId","parentId","list","index"]},{"type":"object","properties":{"kind":{"const":"duplicate"},"nodeId":{"type":"string"}},"required":["kind","nodeId"]},{"type":"object","properties":{"kind":{"const":"show"},"nodeId":{"type":"string"},"everywhere":{"enum":["keep","show","hide"],"type":"string"},"phone":{"enum":["keep","show","hide"],"type":"string"},"tablet":{"enum":["keep","show","hide"],"type":"string"},"desktop":{"enum":["keep","show","hide"],"type":"string"}},"required":["kind","nodeId","everywhere","phone","tablet","desktop"]},{"type":"object","properties":{"kind":{"const":"theme"},"changes":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":"string"}},"json":{"type":"string"}},"required":["path","json"]}}},"required":["kind","changes"]}]}}},"required":["summary","steps"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/ai/palette":{"post":{"operationId":"admin.site.ai.palette","summary":"A palette from the store's logo","tags":["Admin — Online Store & Site"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"palette":{"anyOf":[{"type":"object","properties":{"accent":{"type":"string"},"swatches":{"type":"array","items":{"type":"string"}},"soft":{"type":"string"},"ink":{"type":"string"},"colourful":{"type":"boolean"}},"required":["accent","swatches","soft","ink","colourful"]},{"type":"null"}]}},"required":["palette"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/ai/messages":{"post":{"operationId":"admin.site.ai.converse","summary":"Ask in the conversation","description":"Like `ask`, scoped to an element when the merchant pointed at one; both the request and the answer are kept in the conversation.","tags":["Admin — Online Store & Site"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string"},"pageType":{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"text":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}},"required":["id","type","label","text"]}},"selectedId":{"anyOf":[{"type":"string"},{"type":"null"}]},"documentId":{"type":"string"},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"baseVersion":{"type":"number"},"scope":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string"},"nodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"}},"required":["documentId","nodeId","label"]},{"type":"null"}]},"attachmentIds":{"type":"array","items":{"type":"string"}},"webSearch":{"type":"boolean"}},"required":["prompt","pageType","sections","documentId","conversationId","baseVersion","scope"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string"},"merchant":{"type":"object","properties":{"id":{"type":"string"},"conversationId":{"type":"string"},"role":{"enum":["merchant","assistant"],"type":"string"},"text":{"type":"string"},"scope":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string"},"nodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"}},"required":["documentId","nodeId","label"]},{"type":"null"}]},"steps":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"const":"add"},"section":{"type":"object","properties":{"type":{"type":"string"},"preset":{"anyOf":[{"type":"number"},{"type":"null"}]},"reason":{"type":"string"},"text":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}},"required":["type","preset","reason","text"]},"after":{"anyOf":[{"type":"string"},{"type":"null"}]},"list":{"enum":["sections","header","footer"],"type":"string","default":"sections"},"ref":{"type":"string","default":""}},"required":["kind","section","after"]},{"type":"object","properties":{"kind":{"const":"text"},"nodeId":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"}},"required":["kind","nodeId","key","value"]},{"type":"object","properties":{"kind":{"const":"remove"},"nodeId":{"type":"string"}},"required":["kind","nodeId"]},{"type":"object","properties":{"kind":{"const":"brand"},"color":{"type":"string"}},"required":["kind","color"]},{"type":"object","properties":{"kind":{"const":"fonts"},"pairing":{"enum":["figtree","editorial","modern","classic","urban"],"type":"string"}},"required":["kind","pairing"]},{"type":"object","properties":{"kind":{"const":"settings"},"nodeId":{"type":"string"},"values":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"json":{"type":"string"}},"required":["key","json"]}}},"required":["kind","nodeId","values"]},{"type":"object","properties":{"kind":{"const":"addBlock"},"parentId":{"type":"string"},"type":{"type":"string"},"index":{"type":"number"},"ref":{"type":"string"},"values":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"json":{"type":"string"}},"required":["key","json"]}},"text":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}},"required":["kind","parentId","type","index","ref","values","text"]},{"type":"object","properties":{"kind":{"const":"move"},"nodeId":{"type":"string"},"to":{"type":"number"}},"required":["kind","nodeId","to"]},{"type":"object","properties":{"kind":{"const":"place"},"nodeId":{"type":"string"},"parentId":{"type":"string"},"list":{"enum":["sections","header","footer"],"type":"string"},"index":{"type":"number"}},"required":["kind","nodeId","parentId","list","index"]},{"type":"object","properties":{"kind":{"const":"duplicate"},"nodeId":{"type":"string"}},"required":["kind","nodeId"]},{"type":"object","properties":{"kind":{"const":"show"},"nodeId":{"type":"string"},"everywhere":{"enum":["keep","show","hide"],"type":"string"},"phone":{"enum":["keep","show","hide"],"type":"string"},"tablet":{"enum":["keep","show","hide"],"type":"string"},"desktop":{"enum":["keep","show","hide"],"type":"string"}},"required":["kind","nodeId","everywhere","phone","tablet","desktop"]},{"type":"object","properties":{"kind":{"const":"theme"},"changes":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":"string"}},"json":{"type":"string"}},"required":["path","json"]}}},"required":["kind","changes"]}]}},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"contentType":{"enum":["image/png","image/jpeg","image/webp","image/gif","application/pdf","text/csv","text/tab-separated-values","text/plain","text/markdown","application/json"],"type":"string"},"byteSize":{"type":"number"},"kind":{"enum":["image","pdf","text"],"type":"string"},"previewUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","filename","contentType","byteSize","kind"]},"default":[]},"sources":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"}},"required":["title","url"]},"default":[]},"documentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"baseVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"state":{"anyOf":[{"enum":["open","kept","discarded","stale"],"type":"string"},{"type":"null"}]},"rating":{"anyOf":[{"enum":["up","down"],"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","conversationId","role","text","scope","steps","documentId","baseVersion","state","rating","createdAt"]},"assistant":{"type":"object","properties":{"id":{"type":"string"},"conversationId":{"type":"string"},"role":{"enum":["merchant","assistant"],"type":"string"},"text":{"type":"string"},"scope":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string"},"nodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"}},"required":["documentId","nodeId","label"]},{"type":"null"}]},"steps":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"const":"add"},"section":{"type":"object","properties":{"type":{"type":"string"},"preset":{"anyOf":[{"type":"number"},{"type":"null"}]},"reason":{"type":"string"},"text":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}},"required":["type","preset","reason","text"]},"after":{"anyOf":[{"type":"string"},{"type":"null"}]},"list":{"enum":["sections","header","footer"],"type":"string","default":"sections"},"ref":{"type":"string","default":""}},"required":["kind","section","after"]},{"type":"object","properties":{"kind":{"const":"text"},"nodeId":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"}},"required":["kind","nodeId","key","value"]},{"type":"object","properties":{"kind":{"const":"remove"},"nodeId":{"type":"string"}},"required":["kind","nodeId"]},{"type":"object","properties":{"kind":{"const":"brand"},"color":{"type":"string"}},"required":["kind","color"]},{"type":"object","properties":{"kind":{"const":"fonts"},"pairing":{"enum":["figtree","editorial","modern","classic","urban"],"type":"string"}},"required":["kind","pairing"]},{"type":"object","properties":{"kind":{"const":"settings"},"nodeId":{"type":"string"},"values":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"json":{"type":"string"}},"required":["key","json"]}}},"required":["kind","nodeId","values"]},{"type":"object","properties":{"kind":{"const":"addBlock"},"parentId":{"type":"string"},"type":{"type":"string"},"index":{"type":"number"},"ref":{"type":"string"},"values":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"json":{"type":"string"}},"required":["key","json"]}},"text":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}},"required":["kind","parentId","type","index","ref","values","text"]},{"type":"object","properties":{"kind":{"const":"move"},"nodeId":{"type":"string"},"to":{"type":"number"}},"required":["kind","nodeId","to"]},{"type":"object","properties":{"kind":{"const":"place"},"nodeId":{"type":"string"},"parentId":{"type":"string"},"list":{"enum":["sections","header","footer"],"type":"string"},"index":{"type":"number"}},"required":["kind","nodeId","parentId","list","index"]},{"type":"object","properties":{"kind":{"const":"duplicate"},"nodeId":{"type":"string"}},"required":["kind","nodeId"]},{"type":"object","properties":{"kind":{"const":"show"},"nodeId":{"type":"string"},"everywhere":{"enum":["keep","show","hide"],"type":"string"},"phone":{"enum":["keep","show","hide"],"type":"string"},"tablet":{"enum":["keep","show","hide"],"type":"string"},"desktop":{"enum":["keep","show","hide"],"type":"string"}},"required":["kind","nodeId","everywhere","phone","tablet","desktop"]},{"type":"object","properties":{"kind":{"const":"theme"},"changes":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":"string"}},"json":{"type":"string"}},"required":["path","json"]}}},"required":["kind","changes"]}]}},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"contentType":{"enum":["image/png","image/jpeg","image/webp","image/gif","application/pdf","text/csv","text/tab-separated-values","text/plain","text/markdown","application/json"],"type":"string"},"byteSize":{"type":"number"},"kind":{"enum":["image","pdf","text"],"type":"string"},"previewUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","filename","contentType","byteSize","kind"]},"default":[]},"sources":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"}},"required":["title","url"]},"default":[]},"documentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"baseVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"state":{"anyOf":[{"enum":["open","kept","discarded","stale"],"type":"string"},{"type":"null"}]},"rating":{"anyOf":[{"enum":["up","down"],"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","conversationId","role","text","scope","steps","documentId","baseVersion","state","rating","createdAt"]}},"required":["conversationId","merchant","assistant"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"get":{"operationId":"admin.site.ai.history","summary":"The conversation so far","tags":["Admin — Online Store & Site"],"parameters":[{"name":"conversationId","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"conversationId":{"type":"string"},"role":{"enum":["merchant","assistant"],"type":"string"},"text":{"type":"string"},"scope":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string"},"nodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"}},"required":["documentId","nodeId","label"]},{"type":"null"}]},"steps":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"const":"add"},"section":{"type":"object","properties":{"type":{"type":"string"},"preset":{"anyOf":[{"type":"number"},{"type":"null"}]},"reason":{"type":"string"},"text":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}},"required":["type","preset","reason","text"]},"after":{"anyOf":[{"type":"string"},{"type":"null"}]},"list":{"enum":["sections","header","footer"],"type":"string","default":"sections"},"ref":{"type":"string","default":""}},"required":["kind","section","after"]},{"type":"object","properties":{"kind":{"const":"text"},"nodeId":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"}},"required":["kind","nodeId","key","value"]},{"type":"object","properties":{"kind":{"const":"remove"},"nodeId":{"type":"string"}},"required":["kind","nodeId"]},{"type":"object","properties":{"kind":{"const":"brand"},"color":{"type":"string"}},"required":["kind","color"]},{"type":"object","properties":{"kind":{"const":"fonts"},"pairing":{"enum":["figtree","editorial","modern","classic","urban"],"type":"string"}},"required":["kind","pairing"]},{"type":"object","properties":{"kind":{"const":"settings"},"nodeId":{"type":"string"},"values":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"json":{"type":"string"}},"required":["key","json"]}}},"required":["kind","nodeId","values"]},{"type":"object","properties":{"kind":{"const":"addBlock"},"parentId":{"type":"string"},"type":{"type":"string"},"index":{"type":"number"},"ref":{"type":"string"},"values":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"json":{"type":"string"}},"required":["key","json"]}},"text":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}},"required":["kind","parentId","type","index","ref","values","text"]},{"type":"object","properties":{"kind":{"const":"move"},"nodeId":{"type":"string"},"to":{"type":"number"}},"required":["kind","nodeId","to"]},{"type":"object","properties":{"kind":{"const":"place"},"nodeId":{"type":"string"},"parentId":{"type":"string"},"list":{"enum":["sections","header","footer"],"type":"string"},"index":{"type":"number"}},"required":["kind","nodeId","parentId","list","index"]},{"type":"object","properties":{"kind":{"const":"duplicate"},"nodeId":{"type":"string"}},"required":["kind","nodeId"]},{"type":"object","properties":{"kind":{"const":"show"},"nodeId":{"type":"string"},"everywhere":{"enum":["keep","show","hide"],"type":"string"},"phone":{"enum":["keep","show","hide"],"type":"string"},"tablet":{"enum":["keep","show","hide"],"type":"string"},"desktop":{"enum":["keep","show","hide"],"type":"string"}},"required":["kind","nodeId","everywhere","phone","tablet","desktop"]},{"type":"object","properties":{"kind":{"const":"theme"},"changes":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":"string"}},"json":{"type":"string"}},"required":["path","json"]}}},"required":["kind","changes"]}]}},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"contentType":{"enum":["image/png","image/jpeg","image/webp","image/gif","application/pdf","text/csv","text/tab-separated-values","text/plain","text/markdown","application/json"],"type":"string"},"byteSize":{"type":"number"},"kind":{"enum":["image","pdf","text"],"type":"string"},"previewUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","filename","contentType","byteSize","kind"]},"default":[]},"sources":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"}},"required":["title","url"]},"default":[]},"documentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"baseVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"state":{"anyOf":[{"enum":["open","kept","discarded","stale"],"type":"string"},{"type":"null"}]},"rating":{"anyOf":[{"enum":["up","down"],"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","conversationId","role","text","scope","steps","documentId","baseVersion","state","rating","createdAt"]}},"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","title","at"]}}},"required":["conversationId","messages","conversations"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/site/ai/messages/{id}":{"post":{"operationId":"admin.site.ai.settle","summary":"Record what happened to an answer","description":"Kept, discarded or out of date, and the merchant's thumbs up or down. Changes nothing on the site.","tags":["Admin — Online Store & Site"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"enum":["kept","discarded","stale"],"type":"string"},"rating":{"enum":["up","down"],"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"conversationId":{"type":"string"},"role":{"enum":["merchant","assistant"],"type":"string"},"text":{"type":"string"},"scope":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string"},"nodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"}},"required":["documentId","nodeId","label"]},{"type":"null"}]},"steps":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"const":"add"},"section":{"type":"object","properties":{"type":{"type":"string"},"preset":{"anyOf":[{"type":"number"},{"type":"null"}]},"reason":{"type":"string"},"text":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}},"required":["type","preset","reason","text"]},"after":{"anyOf":[{"type":"string"},{"type":"null"}]},"list":{"enum":["sections","header","footer"],"type":"string","default":"sections"},"ref":{"type":"string","default":""}},"required":["kind","section","after"]},{"type":"object","properties":{"kind":{"const":"text"},"nodeId":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"}},"required":["kind","nodeId","key","value"]},{"type":"object","properties":{"kind":{"const":"remove"},"nodeId":{"type":"string"}},"required":["kind","nodeId"]},{"type":"object","properties":{"kind":{"const":"brand"},"color":{"type":"string"}},"required":["kind","color"]},{"type":"object","properties":{"kind":{"const":"fonts"},"pairing":{"enum":["figtree","editorial","modern","classic","urban"],"type":"string"}},"required":["kind","pairing"]},{"type":"object","properties":{"kind":{"const":"settings"},"nodeId":{"type":"string"},"values":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"json":{"type":"string"}},"required":["key","json"]}}},"required":["kind","nodeId","values"]},{"type":"object","properties":{"kind":{"const":"addBlock"},"parentId":{"type":"string"},"type":{"type":"string"},"index":{"type":"number"},"ref":{"type":"string"},"values":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"json":{"type":"string"}},"required":["key","json"]}},"text":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}},"required":["kind","parentId","type","index","ref","values","text"]},{"type":"object","properties":{"kind":{"const":"move"},"nodeId":{"type":"string"},"to":{"type":"number"}},"required":["kind","nodeId","to"]},{"type":"object","properties":{"kind":{"const":"place"},"nodeId":{"type":"string"},"parentId":{"type":"string"},"list":{"enum":["sections","header","footer"],"type":"string"},"index":{"type":"number"}},"required":["kind","nodeId","parentId","list","index"]},{"type":"object","properties":{"kind":{"const":"duplicate"},"nodeId":{"type":"string"}},"required":["kind","nodeId"]},{"type":"object","properties":{"kind":{"const":"show"},"nodeId":{"type":"string"},"everywhere":{"enum":["keep","show","hide"],"type":"string"},"phone":{"enum":["keep","show","hide"],"type":"string"},"tablet":{"enum":["keep","show","hide"],"type":"string"},"desktop":{"enum":["keep","show","hide"],"type":"string"}},"required":["kind","nodeId","everywhere","phone","tablet","desktop"]},{"type":"object","properties":{"kind":{"const":"theme"},"changes":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":"string"}},"json":{"type":"string"}},"required":["path","json"]}}},"required":["kind","changes"]}]}},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"contentType":{"enum":["image/png","image/jpeg","image/webp","image/gif","application/pdf","text/csv","text/tab-separated-values","text/plain","text/markdown","application/json"],"type":"string"},"byteSize":{"type":"number"},"kind":{"enum":["image","pdf","text"],"type":"string"},"previewUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","filename","contentType","byteSize","kind"]},"default":[]},"sources":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"}},"required":["title","url"]},"default":[]},"documentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"baseVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"state":{"anyOf":[{"enum":["open","kept","discarded","stale"],"type":"string"},{"type":"null"}]},"rating":{"anyOf":[{"enum":["up","down"],"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","conversationId","role","text","scope","steps","documentId","baseVersion","state","rating","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{"type":"object","properties":{"documentId":{"type":"string"}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"},"currentVersion":{"type":"number"},"documentId":{"type":"string"},"usedBy":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["theme","layout","template","page","component","menu","assignments","code"],"type":"string"},"title":{"type":"string"}},"required":["id","kind","title"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"nodeId":{"type":"string"},"documentId":{"type":"string"}},"required":["path","code","message","severity"]}}}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/engagement":{"get":{"operationId":"admin.engagement.subscribers","summary":"Count subscribers and list the latest 100 subscriptions","description":"Pass `kind` to list only newsletter sign-ups or only back-in-stock requests; the counts always cover both.","tags":["Admin — Content & Reviews"],"parameters":[{"name":"kind","in":"query","schema":{"enum":["newsletter","back_in_stock"],"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"newsletter":{"type":"number"},"backInStock":{"type":"number"},"subscribers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["newsletter","back_in_stock"],"type":"string"},"email":{"type":"string"},"productTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["active","notified","unsubscribed"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","email","productTitle","status","createdAt"]}}},"required":["newsletter","backInStock","subscribers"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/engagement/unsubscribe":{"post":{"operationId":"admin.engagement.removeSubscriber","summary":"Unsubscribe a shopper","tags":["Admin — Content & Reviews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["newsletter","back_in_stock"],"type":"string"}},"required":["id","kind"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"unsubscribed":{"const":true}},"required":["unsubscribed"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/store":{"get":{"operationId":"admin.store.get","summary":"Get the current store","tags":["Admin — Store & Settings"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"currency":{"enum":["PKR"],"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string","default":"PK"},"timezone":{"type":"string"},"theme":{"type":"object","properties":{"preset":{"enum":["counter","bazaar","truck-art"],"type":"string"},"accent":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"anyOf":[{"enum":["sm","md","lg"],"type":"string"},{"type":"null"}]},"appearance":{"enum":["system","light","dark"],"type":"string"},"fontPairing":{"enum":["figtree","editorial","modern","classic","urban"],"type":"string"},"productCard":{"enum":["standard","minimal","overlay"],"type":"string"},"density":{"enum":["comfortable","compact"],"type":"string"},"headingScale":{"enum":["s","m","l"],"type":"string"},"headingCase":{"enum":["normal","uppercase"],"type":"string"},"buttonShape":{"enum":["square","rounded","pill"],"type":"string"},"buttonStyle":{"enum":["solid","outline"],"type":"string"},"cardImageRatio":{"enum":["portrait","square","landscape"],"type":"string"}},"required":["preset","accent","radius","appearance","fontPairing","productCard","density","headingScale","headingCase","buttonShape","buttonStyle","cardImageRatio"]},"profile":{"type":"object","properties":{"logo":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]},"favicon":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"seoImage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}],"default":null},"announcement":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"text":{"type":"string"},"link":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"const":"home"}},"required":["type"]},{"type":"object","properties":{"type":{"const":"blog"}},"required":["type"]},{"type":"object","properties":{"type":{"const":"search"}},"required":["type"]},{"type":"object","properties":{"type":{"const":"collections"}},"required":["type"]},{"type":"object","properties":{"type":{"const":"collection"},"id":{"type":"string"}},"required":["type","id"]},{"type":"object","properties":{"type":{"const":"product"},"id":{"type":"string"}},"required":["type","id"]},{"type":"object","properties":{"type":{"const":"page"},"id":{"type":"string"}},"required":["type","id"]},{"type":"object","properties":{"type":{"const":"article"},"id":{"type":"string"}},"required":["type","id"]},{"type":"object","properties":{"type":{"const":"url"},"url":{"type":"string"}},"required":["type","url"]}]},{"type":"null"}]}},"required":["enabled","text","link"]},{"type":"null"}]},"contactEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"whatsappNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"socialLinks":{"type":"object","propertyNames":{"enum":["facebook","instagram","tiktok","youtube","x"],"type":"string"},"additionalProperties":{"type":"string"}}},"required":["logo","favicon","announcement","contactEmail","contactPhone","whatsappNumber","address","socialLinks"]},"policies":{"type":"array","items":{"type":"object","properties":{"handle":{"type":"string"},"title":{"type":"string"},"kind":{"enum":["page","contact","policy_refund","policy_shipping","policy_privacy","policy_terms"],"type":"string"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["handle","title","kind","updatedAt"]}},"primaryHost":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkout":{"type":"object","properties":{"emailMode":{"enum":["off","optional","required"],"type":"string"},"fields":{"type":"object","properties":{"line2":{"enum":["hidden","optional","required"],"type":"string"},"landmark":{"enum":["hidden","optional","required"],"type":"string"},"postalCode":{"enum":["auto","hidden","optional","required"],"type":"string"}},"required":["line2","landmark","postalCode"]},"orderNotes":{"type":"boolean"},"trustMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"hiddenPolicies":{"type":"array","items":{"type":"string"}},"requireTerms":{"type":"boolean"}},"required":["emailMode","fields","orderNotes","trustMessage","hiddenPolicies","requireTerms"]},"whatsappUpdates":{"type":"boolean"},"customerPortal":{"type":"object","properties":{"enabled":{"type":"boolean"},"showHeaderLink":{"type":"boolean"},"loginMethods":{"type":"object","properties":{"emailOtp":{"type":"boolean"},"whatsappOtp":{"type":"boolean"},"smsOtp":{"type":"boolean"}},"required":["emailOtp","whatsappOtp","smsOtp"]},"allowAddressBook":{"type":"boolean"},"allowMarketingOptIn":{"type":"boolean"},"showSmsPreferences":{"type":"boolean"},"allowReorder":{"type":"boolean"},"allowCodSelfConfirm":{"type":"boolean"},"allowDeliveryEdit":{"type":"boolean"},"deliveryEditCutoff":{"enum":["before_confirmed","before_packed","before_dispatched"],"type":"string"},"deliveryEditWindowMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowCityProvinceChange":{"type":"boolean"},"allowPrepaidDeliveryEdit":{"type":"boolean"},"allowOrderNoteEdit":{"type":"boolean"},"allowOrderCancellation":{"type":"boolean"},"cancellationCutoff":{"enum":["before_confirmed","before_packed","before_dispatched"],"type":"string"},"cancellationWindowMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowPrepaidCancellation":{"type":"boolean"},"allowVariantSwap":{"type":"boolean"},"variantSwapCutoff":{"enum":["before_confirmed","before_packed","before_dispatched"],"type":"string"},"allowCodItemEdits":{"type":"boolean"},"codItemEditWindowMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowReturnRequests":{"type":"boolean"},"returnWindowDays":{"type":"number"}},"required":["enabled","showHeaderLink","loginMethods","allowAddressBook","allowMarketingOptIn","showSmsPreferences","allowReorder","allowCodSelfConfirm","allowDeliveryEdit","deliveryEditCutoff","deliveryEditWindowMinutes","allowCityProvinceChange","allowPrepaidDeliveryEdit","allowOrderNoteEdit","allowOrderCancellation","cancellationCutoff","cancellationWindowMinutes","allowPrepaidCancellation","allowVariantSwap","variantSwapCutoff","allowCodItemEdits","codItemEditWindowMinutes","allowReturnRequests","returnWindowDays"]},"shippingCoverage":{"type":"object","properties":{"countries":{"type":"array","items":{"type":"object","properties":{"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"regionRestriction":{"enum":["all","only"],"type":"string"},"allowedRegions":{"type":"array","items":{"type":"string"}},"excludedRegions":{"type":"array","items":{"type":"string"}},"cityOnlyRegions":{"type":"array","items":{"type":"string"}},"cityRestriction":{"enum":["any","only"],"type":"string"},"allowedCities":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"normalized":{"type":"string"},"regionCode":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","normalized","regionCode"]}},"excludedCities":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"normalized":{"type":"string"},"regionCode":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","normalized","regionCode"]}}},"required":["country","regionRestriction","allowedRegions","excludedRegions","cityOnlyRegions","cityRestriction","allowedCities","excludedCities"]}}},"required":["countries"]},"codEnabled":{"type":"boolean","default":true},"codScope":{"enum":["domestic","selected_zones","all"],"type":"string","default":"domestic"},"status":{"enum":["trial","active","suspended","deleted"],"type":"string"},"ntn":{"anyOf":[{"type":"string"},{"type":"null"}]},"strn":{"anyOf":[{"type":"string"},{"type":"null"}]},"codFeePaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"},"abandonedCheckoutAfterMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"lowStockThreshold":{"type":"number"},"plan":{"type":"string"},"trialEndsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"templateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","name","currency","timezone","theme","profile","policies","primaryHost","checkout","whatsappUpdates","customerPortal","shippingCoverage","status","ntn","strn","codFeePaisa","taxRateBps","pricesIncludeTax","abandonedCheckoutAfterMinutes","lowStockThreshold","plan","trialEndsAt","templateId","templateVersion","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"patch":{"operationId":"admin.store.update","summary":"Update the current store","tags":["Admin — Store & Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"timezone":{"type":"string"},"ntn":{"anyOf":[{"type":"string"},{"type":"null"}]},"strn":{"anyOf":[{"type":"string"},{"type":"null"}]},"codFeePaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"},"abandonedCheckoutAfterMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"lowStockThreshold":{"type":"number"},"logoMediaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"faviconMediaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"whatsappNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"currency":{"enum":["PKR"],"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string","default":"PK"},"timezone":{"type":"string"},"theme":{"type":"object","properties":{"preset":{"enum":["counter","bazaar","truck-art"],"type":"string"},"accent":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"anyOf":[{"enum":["sm","md","lg"],"type":"string"},{"type":"null"}]},"appearance":{"enum":["system","light","dark"],"type":"string"},"fontPairing":{"enum":["figtree","editorial","modern","classic","urban"],"type":"string"},"productCard":{"enum":["standard","minimal","overlay"],"type":"string"},"density":{"enum":["comfortable","compact"],"type":"string"},"headingScale":{"enum":["s","m","l"],"type":"string"},"headingCase":{"enum":["normal","uppercase"],"type":"string"},"buttonShape":{"enum":["square","rounded","pill"],"type":"string"},"buttonStyle":{"enum":["solid","outline"],"type":"string"},"cardImageRatio":{"enum":["portrait","square","landscape"],"type":"string"}},"required":["preset","accent","radius","appearance","fontPairing","productCard","density","headingScale","headingCase","buttonShape","buttonStyle","cardImageRatio"]},"profile":{"type":"object","properties":{"logo":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]},"favicon":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"seoImage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}],"default":null},"announcement":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"text":{"type":"string"},"link":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"const":"home"}},"required":["type"]},{"type":"object","properties":{"type":{"const":"blog"}},"required":["type"]},{"type":"object","properties":{"type":{"const":"search"}},"required":["type"]},{"type":"object","properties":{"type":{"const":"collections"}},"required":["type"]},{"type":"object","properties":{"type":{"const":"collection"},"id":{"type":"string"}},"required":["type","id"]},{"type":"object","properties":{"type":{"const":"product"},"id":{"type":"string"}},"required":["type","id"]},{"type":"object","properties":{"type":{"const":"page"},"id":{"type":"string"}},"required":["type","id"]},{"type":"object","properties":{"type":{"const":"article"},"id":{"type":"string"}},"required":["type","id"]},{"type":"object","properties":{"type":{"const":"url"},"url":{"type":"string"}},"required":["type","url"]}]},{"type":"null"}]}},"required":["enabled","text","link"]},{"type":"null"}]},"contactEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"whatsappNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"socialLinks":{"type":"object","propertyNames":{"enum":["facebook","instagram","tiktok","youtube","x"],"type":"string"},"additionalProperties":{"type":"string"}}},"required":["logo","favicon","announcement","contactEmail","contactPhone","whatsappNumber","address","socialLinks"]},"policies":{"type":"array","items":{"type":"object","properties":{"handle":{"type":"string"},"title":{"type":"string"},"kind":{"enum":["page","contact","policy_refund","policy_shipping","policy_privacy","policy_terms"],"type":"string"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["handle","title","kind","updatedAt"]}},"primaryHost":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkout":{"type":"object","properties":{"emailMode":{"enum":["off","optional","required"],"type":"string"},"fields":{"type":"object","properties":{"line2":{"enum":["hidden","optional","required"],"type":"string"},"landmark":{"enum":["hidden","optional","required"],"type":"string"},"postalCode":{"enum":["auto","hidden","optional","required"],"type":"string"}},"required":["line2","landmark","postalCode"]},"orderNotes":{"type":"boolean"},"trustMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"hiddenPolicies":{"type":"array","items":{"type":"string"}},"requireTerms":{"type":"boolean"}},"required":["emailMode","fields","orderNotes","trustMessage","hiddenPolicies","requireTerms"]},"whatsappUpdates":{"type":"boolean"},"customerPortal":{"type":"object","properties":{"enabled":{"type":"boolean"},"showHeaderLink":{"type":"boolean"},"loginMethods":{"type":"object","properties":{"emailOtp":{"type":"boolean"},"whatsappOtp":{"type":"boolean"},"smsOtp":{"type":"boolean"}},"required":["emailOtp","whatsappOtp","smsOtp"]},"allowAddressBook":{"type":"boolean"},"allowMarketingOptIn":{"type":"boolean"},"showSmsPreferences":{"type":"boolean"},"allowReorder":{"type":"boolean"},"allowCodSelfConfirm":{"type":"boolean"},"allowDeliveryEdit":{"type":"boolean"},"deliveryEditCutoff":{"enum":["before_confirmed","before_packed","before_dispatched"],"type":"string"},"deliveryEditWindowMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowCityProvinceChange":{"type":"boolean"},"allowPrepaidDeliveryEdit":{"type":"boolean"},"allowOrderNoteEdit":{"type":"boolean"},"allowOrderCancellation":{"type":"boolean"},"cancellationCutoff":{"enum":["before_confirmed","before_packed","before_dispatched"],"type":"string"},"cancellationWindowMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowPrepaidCancellation":{"type":"boolean"},"allowVariantSwap":{"type":"boolean"},"variantSwapCutoff":{"enum":["before_confirmed","before_packed","before_dispatched"],"type":"string"},"allowCodItemEdits":{"type":"boolean"},"codItemEditWindowMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowReturnRequests":{"type":"boolean"},"returnWindowDays":{"type":"number"}},"required":["enabled","showHeaderLink","loginMethods","allowAddressBook","allowMarketingOptIn","showSmsPreferences","allowReorder","allowCodSelfConfirm","allowDeliveryEdit","deliveryEditCutoff","deliveryEditWindowMinutes","allowCityProvinceChange","allowPrepaidDeliveryEdit","allowOrderNoteEdit","allowOrderCancellation","cancellationCutoff","cancellationWindowMinutes","allowPrepaidCancellation","allowVariantSwap","variantSwapCutoff","allowCodItemEdits","codItemEditWindowMinutes","allowReturnRequests","returnWindowDays"]},"shippingCoverage":{"type":"object","properties":{"countries":{"type":"array","items":{"type":"object","properties":{"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"regionRestriction":{"enum":["all","only"],"type":"string"},"allowedRegions":{"type":"array","items":{"type":"string"}},"excludedRegions":{"type":"array","items":{"type":"string"}},"cityOnlyRegions":{"type":"array","items":{"type":"string"}},"cityRestriction":{"enum":["any","only"],"type":"string"},"allowedCities":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"normalized":{"type":"string"},"regionCode":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","normalized","regionCode"]}},"excludedCities":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"normalized":{"type":"string"},"regionCode":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","normalized","regionCode"]}}},"required":["country","regionRestriction","allowedRegions","excludedRegions","cityOnlyRegions","cityRestriction","allowedCities","excludedCities"]}}},"required":["countries"]},"codEnabled":{"type":"boolean","default":true},"codScope":{"enum":["domestic","selected_zones","all"],"type":"string","default":"domestic"},"status":{"enum":["trial","active","suspended","deleted"],"type":"string"},"ntn":{"anyOf":[{"type":"string"},{"type":"null"}]},"strn":{"anyOf":[{"type":"string"},{"type":"null"}]},"codFeePaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"},"abandonedCheckoutAfterMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"lowStockThreshold":{"type":"number"},"plan":{"type":"string"},"trialEndsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"templateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","name","currency","timezone","theme","profile","policies","primaryHost","checkout","whatsappUpdates","customerPortal","shippingCoverage","status","ntn","strn","codFeePaisa","taxRateBps","pricesIncludeTax","abandonedCheckoutAfterMinutes","lowStockThreshold","plan","trialEndsAt","templateId","templateVersion","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/store/domains":{"get":{"operationId":"admin.store.listDomains","summary":"List the store's domains","tags":["Admin — Store & Settings"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"hostname":{"type":"string"},"isPrimary":{"type":"boolean"},"verifiedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","hostname","isPrimary","verifiedAt","createdAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"post":{"operationId":"admin.store.addDomain","summary":"Add a custom domain","description":"Creates a connection for the typed domain and returns its address row. A subdomain is one row; a root (or `www.` root) becomes root + `www` rows where the DNS provider can point the root, otherwise a `www` address the provider forwards the root to. Detects the DNS provider and returns every setting the connection needs. The five-domain limit counts connections. includeEmail also reserves the sender domain; it requires a merchant session with app management permission.","tags":["Admin — Store & Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"includeEmail":{"type":"boolean"},"hostname":{"type":"string"}},"required":["hostname"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"hostname":{"type":"string"},"connectionId":{"type":"string"},"role":{"enum":["address","alias"],"type":"string"},"isPrimary":{"type":"boolean"},"status":{"enum":["pending","verified","failed"],"type":"string"},"records":{"type":"array","items":{"type":"object","properties":{"role":{"enum":["address","certificate","ownership"],"type":"string"},"recordType":{"enum":["CNAME","TXT","A","AAAA"],"type":"string"},"hostname":{"type":"string"},"name":{"type":"string"},"target":{"type":"string"},"status":{"enum":["found","missing","different","proxied"],"type":"string"}},"required":["role","recordType","hostname","name","target"]}},"forwarding":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"status":{"enum":["unknown","working","missing"],"type":"string"}},"required":["from","to","status"]},{"type":"null"}]},"connect":{"type":"object","properties":{"provider":{"enum":["cloudflare","godaddy","ionos","vercel","namecheap","hostinger","route53","squarespace","wix","porkbun","namecom","other"],"type":"string"},"providerName":{"type":"string"},"dashboardUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"zone":{"type":"string"},"strategy":{"enum":["subdomain","root","www"],"type":"string"},"available":{"type":"boolean"},"reason":{"enum":["ready","disabled","template_unavailable","provider_unknown","provider_unavailable","platform_unavailable","not_configured"],"type":"string"},"platformReady":{"type":"boolean"},"refreshedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["provider","providerName","dashboardUrl","zone","strategy","available","reason","platformReady","refreshedAt"]},"certificate":{"enum":["waiting","securing","active"],"type":"string"},"verifiedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastCheckedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","hostname","connectionId","role","isPrimary","status","records","forwarding","connect","certificate","verifiedAt","lastCheckedAt","lastError","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/store/launch":{"get":{"operationId":"admin.store.getLaunch","summary":"Get the store's launch state and checklist","tags":["Admin — Store & Settings"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"launchStatus":{"enum":["draft","in_review","live","rejected"],"type":"string"},"requestedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"reviewedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rejectionReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"checklist":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"key":{"enum":["email_verified","product","shipping","contact"],"type":"string"},"done":{"type":"boolean"},"href":{"type":"string"},"description":{"type":"string"},"actionLabel":{"type":"string"}},"required":["key","done","href"]}},"ready":{"type":"boolean"}},"required":["items","ready"]},"storefrontUrl":{"type":"string"}},"required":["launchStatus","requestedAt","reviewedAt","rejectionReason","checklist","storefrontUrl"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"post":{"operationId":"admin.store.requestLaunch","summary":"Ask devhelp to review the store for launch","description":"Refused with UNPROCESSABLE_CONTENT (reason `launch_checklist_incomplete`) until every checklist item is done.","tags":["Admin — Store & Settings"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"launchStatus":{"enum":["draft","in_review","live","rejected"],"type":"string"},"requestedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"reviewedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rejectionReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"checklist":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"key":{"enum":["email_verified","product","shipping","contact"],"type":"string"},"done":{"type":"boolean"},"href":{"type":"string"},"description":{"type":"string"},"actionLabel":{"type":"string"}},"required":["key","done","href"]}},"ready":{"type":"boolean"}},"required":["items","ready"]},"storefrontUrl":{"type":"string"}},"required":["launchStatus","requestedAt","reviewedAt","rejectionReason","checklist","storefrontUrl"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/store/preview-link":{"post":{"operationId":"admin.store.createPreviewLink","summary":"Create a short-lived link to preview the storefront before launch","tags":["Admin — Store & Settings"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["url","expiresAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/store/custom-domains":{"get":{"operationId":"admin.store.listCustomDomains","summary":"List custom domains with verification status","description":"Returns one item per hostname row. Group rows by `connectionId`; the `address` row carries the whole connection's settings.","tags":["Admin — Store & Settings"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"hostname":{"type":"string"},"connectionId":{"type":"string"},"role":{"enum":["address","alias"],"type":"string"},"isPrimary":{"type":"boolean"},"status":{"enum":["pending","verified","failed"],"type":"string"},"records":{"type":"array","items":{"type":"object","properties":{"role":{"enum":["address","certificate","ownership"],"type":"string"},"recordType":{"enum":["CNAME","TXT","A","AAAA"],"type":"string"},"hostname":{"type":"string"},"name":{"type":"string"},"target":{"type":"string"},"status":{"enum":["found","missing","different","proxied"],"type":"string"}},"required":["role","recordType","hostname","name","target"]}},"forwarding":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"status":{"enum":["unknown","working","missing"],"type":"string"}},"required":["from","to","status"]},{"type":"null"}]},"connect":{"type":"object","properties":{"provider":{"enum":["cloudflare","godaddy","ionos","vercel","namecheap","hostinger","route53","squarespace","wix","porkbun","namecom","other"],"type":"string"},"providerName":{"type":"string"},"dashboardUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"zone":{"type":"string"},"strategy":{"enum":["subdomain","root","www"],"type":"string"},"available":{"type":"boolean"},"reason":{"enum":["ready","disabled","template_unavailable","provider_unknown","provider_unavailable","platform_unavailable","not_configured"],"type":"string"},"platformReady":{"type":"boolean"},"refreshedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["provider","providerName","dashboardUrl","zone","strategy","available","reason","platformReady","refreshedAt"]},"certificate":{"enum":["waiting","securing","active"],"type":"string"},"verifiedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastCheckedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","hostname","connectionId","role","isPrimary","status","records","forwarding","connect","certificate","verifiedAt","lastCheckedAt","lastError","createdAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/store/domains/{id}/connection":{"post":{"operationId":"admin.store.refreshDomainConnection","summary":"Detect DNS provider and connection options","tags":["Admin — Store & Settings"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"hostname":{"type":"string"},"connectionId":{"type":"string"},"role":{"enum":["address","alias"],"type":"string"},"isPrimary":{"type":"boolean"},"status":{"enum":["pending","verified","failed"],"type":"string"},"records":{"type":"array","items":{"type":"object","properties":{"role":{"enum":["address","certificate","ownership"],"type":"string"},"recordType":{"enum":["CNAME","TXT","A","AAAA"],"type":"string"},"hostname":{"type":"string"},"name":{"type":"string"},"target":{"type":"string"},"status":{"enum":["found","missing","different","proxied"],"type":"string"}},"required":["role","recordType","hostname","name","target"]}},"forwarding":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"status":{"enum":["unknown","working","missing"],"type":"string"}},"required":["from","to","status"]},{"type":"null"}]},"connect":{"type":"object","properties":{"provider":{"enum":["cloudflare","godaddy","ionos","vercel","namecheap","hostinger","route53","squarespace","wix","porkbun","namecom","other"],"type":"string"},"providerName":{"type":"string"},"dashboardUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"zone":{"type":"string"},"strategy":{"enum":["subdomain","root","www"],"type":"string"},"available":{"type":"boolean"},"reason":{"enum":["ready","disabled","template_unavailable","provider_unknown","provider_unavailable","platform_unavailable","not_configured"],"type":"string"},"platformReady":{"type":"boolean"},"refreshedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["provider","providerName","dashboardUrl","zone","strategy","available","reason","platformReady","refreshedAt"]},"certificate":{"enum":["waiting","securing","active"],"type":"string"},"verifiedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastCheckedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","hostname","connectionId","role","isPrimary","status","records","forwarding","connect","certificate","verifiedAt","lastCheckedAt","lastError","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/store/domains/{id}/verify":{"post":{"operationId":"admin.store.verifyDomain","summary":"Check a domain's records now","description":"Checks every row of the domain's connection and returns the requested row.","tags":["Admin — Store & Settings"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"hostname":{"type":"string"},"connectionId":{"type":"string"},"role":{"enum":["address","alias"],"type":"string"},"isPrimary":{"type":"boolean"},"status":{"enum":["pending","verified","failed"],"type":"string"},"records":{"type":"array","items":{"type":"object","properties":{"role":{"enum":["address","certificate","ownership"],"type":"string"},"recordType":{"enum":["CNAME","TXT","A","AAAA"],"type":"string"},"hostname":{"type":"string"},"name":{"type":"string"},"target":{"type":"string"},"status":{"enum":["found","missing","different","proxied"],"type":"string"}},"required":["role","recordType","hostname","name","target"]}},"forwarding":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"status":{"enum":["unknown","working","missing"],"type":"string"}},"required":["from","to","status"]},{"type":"null"}]},"connect":{"type":"object","properties":{"provider":{"enum":["cloudflare","godaddy","ionos","vercel","namecheap","hostinger","route53","squarespace","wix","porkbun","namecom","other"],"type":"string"},"providerName":{"type":"string"},"dashboardUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"zone":{"type":"string"},"strategy":{"enum":["subdomain","root","www"],"type":"string"},"available":{"type":"boolean"},"reason":{"enum":["ready","disabled","template_unavailable","provider_unknown","provider_unavailable","platform_unavailable","not_configured"],"type":"string"},"platformReady":{"type":"boolean"},"refreshedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["provider","providerName","dashboardUrl","zone","strategy","available","reason","platformReady","refreshedAt"]},"certificate":{"enum":["waiting","securing","active"],"type":"string"},"verifiedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastCheckedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","hostname","connectionId","role","isPrimary","status","records","forwarding","connect","certificate","verifiedAt","lastCheckedAt","lastError","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/store/domains/{id}/primary":{"post":{"operationId":"admin.store.setPrimaryDomain","summary":"Make a connected domain the primary storefront host","description":"Accepts any row of a connection and makes the connection's address row primary.","tags":["Admin — Store & Settings"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"hostname":{"type":"string"},"connectionId":{"type":"string"},"role":{"enum":["address","alias"],"type":"string"},"isPrimary":{"type":"boolean"},"status":{"enum":["pending","verified","failed"],"type":"string"},"records":{"type":"array","items":{"type":"object","properties":{"role":{"enum":["address","certificate","ownership"],"type":"string"},"recordType":{"enum":["CNAME","TXT","A","AAAA"],"type":"string"},"hostname":{"type":"string"},"name":{"type":"string"},"target":{"type":"string"},"status":{"enum":["found","missing","different","proxied"],"type":"string"}},"required":["role","recordType","hostname","name","target"]}},"forwarding":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"status":{"enum":["unknown","working","missing"],"type":"string"}},"required":["from","to","status"]},{"type":"null"}]},"connect":{"type":"object","properties":{"provider":{"enum":["cloudflare","godaddy","ionos","vercel","namecheap","hostinger","route53","squarespace","wix","porkbun","namecom","other"],"type":"string"},"providerName":{"type":"string"},"dashboardUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"zone":{"type":"string"},"strategy":{"enum":["subdomain","root","www"],"type":"string"},"available":{"type":"boolean"},"reason":{"enum":["ready","disabled","template_unavailable","provider_unknown","provider_unavailable","platform_unavailable","not_configured"],"type":"string"},"platformReady":{"type":"boolean"},"refreshedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["provider","providerName","dashboardUrl","zone","strategy","available","reason","platformReady","refreshedAt"]},"certificate":{"enum":["waiting","securing","active"],"type":"string"},"verifiedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastCheckedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","hostname","connectionId","role","isPrimary","status","records","forwarding","connect","certificate","verifiedAt","lastCheckedAt","lastError","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/store/domains/{id}":{"delete":{"operationId":"admin.store.removeDomain","summary":"Disconnect a custom domain","description":"Retires every row of the domain's connection and removes their certificates.","tags":["Admin — Store & Settings"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"const":true}},"required":["id","deleted"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/media/{id}":{"get":{"operationId":"admin.media.get","summary":"Read a media item","tags":["Admin — Catalog"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"patch":{"operationId":"admin.media.update","summary":"Update a media item","tags":["Admin — Catalog"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["alt"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.media.remove","summary":"Delete a media item","tags":["Admin — Catalog"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"const":true}},"required":["id","deleted"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/media/uploads":{"post":{"operationId":"admin.media.createUpload","summary":"Reserve an upload and get a presigned URL","tags":["Admin — Catalog"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contentType":{"enum":["image/jpeg","image/png","image/webp","image/avif"],"type":"string"},"byteSize":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"alt":{"type":"string"}},"required":["contentType","byteSize"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"mediaId":{"type":"string"},"uploadUrl":{"type":"string"},"contentType":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["mediaId","uploadUrl","contentType","expiresAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/media/{id}/complete":{"post":{"operationId":"admin.media.completeUpload","summary":"Confirm an upload landed","description":"The server reads the object back from storage and records its real size and checksum, so a media record cannot claim an upload that never happened.","tags":["Admin — Catalog"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/media":{"get":{"operationId":"admin.media.list","summary":"List media","tags":["Admin — Catalog"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/products/bulk":{"post":{"operationId":"admin.products.bulk","summary":"Edit selected products atomically","description":"Requires an Idempotency-Key header reused for retries. Ordered actions apply to at most 100 products; price amounts are integer paisa or basis points. Collection actions additionally require collection:update.","tags":["Admin — Catalog"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}},"actions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"const":"status"},"status":{"enum":["active","draft","archived"],"type":"string"}},"required":["kind","status"]},{"type":"object","properties":{"kind":{"const":"tags"},"operation":{"enum":["add","remove"],"type":"string"},"tags":{"type":"array","items":{"type":"string"}}},"required":["kind","operation","tags"]},{"type":"object","properties":{"kind":{"const":"collections"},"operation":{"enum":["add","remove"],"type":"string"},"collectionIds":{"type":"array","items":{"type":"string"}}},"required":["kind","operation","collectionIds"]},{"type":"object","properties":{"kind":{"const":"price"},"mode":{"enum":["fixed","percentage"],"type":"string"},"amount":{"type":"number"}},"required":["kind","mode","amount"]},{"type":"object","properties":{"kind":{"const":"compareAt"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["kind","amount"]}]}}},"required":["ids","actions"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/products/{id}/duplicate":{"post":{"operationId":"admin.products.duplicate","summary":"Duplicate a product as a draft without stock","description":"Requires an Idempotency-Key header reused for retries. Copies options, variants and media references with new identities and suffixed SKUs. Inventory is never copied.","tags":["Admin — Catalog"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/products/export":{"get":{"operationId":"admin.products.exportCsv","summary":"Export all products as CSV (up to 10000 products and 20 MB)","tags":["Admin — Catalog"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string"},"filename":{"type":"string"}},"required":["csv","filename"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/products/views":{"get":{"operationId":"admin.products.listViews","summary":"List saved product views","tags":["Admin — Catalog"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"filters":{"type":"object","properties":{"q":{"type":"string"},"minPricePaisa":{"type":"number"},"maxPricePaisa":{"type":"number"},"available":{"type":"boolean"},"vendor":{"type":"array","items":{"type":"string"}},"productType":{"type":"array","items":{"type":"string"}},"option":{"type":"array","items":{"type":"string"}},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"collectionId":{"type":"string"},"stock":{"enum":["in_stock","low_stock","partly_sold_out","out_of_stock","untracked"],"type":"string"},"sort":{"enum":["newest","featured","updated","title_asc","price_asc","price_desc","inventory_asc"],"type":"string"}}}},"required":["id","name","filters"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"post":{"operationId":"admin.products.saveView","summary":"Save a named product view","tags":["Admin — Catalog"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"filters":{"type":"object","properties":{"q":{"type":"string"},"minPricePaisa":{"type":"number"},"maxPricePaisa":{"type":"number"},"available":{"type":"boolean"},"vendor":{"type":"array","items":{"type":"string"}},"productType":{"type":"array","items":{"type":"string"}},"option":{"type":"array","items":{"type":"string"}},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"collectionId":{"type":"string"},"stock":{"enum":["in_stock","low_stock","partly_sold_out","out_of_stock","untracked"],"type":"string"},"sort":{"enum":["newest","featured","updated","title_asc","price_asc","price_desc","inventory_asc"],"type":"string"}}}},"required":["name","filters"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"filters":{"type":"object","properties":{"q":{"type":"string"},"minPricePaisa":{"type":"number"},"maxPricePaisa":{"type":"number"},"available":{"type":"boolean"},"vendor":{"type":"array","items":{"type":"string"}},"productType":{"type":"array","items":{"type":"string"}},"option":{"type":"array","items":{"type":"string"}},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"collectionId":{"type":"string"},"stock":{"enum":["in_stock","low_stock","partly_sold_out","out_of_stock","untracked"],"type":"string"},"sort":{"enum":["newest","featured","updated","title_asc","price_asc","price_desc","inventory_asc"],"type":"string"}}}},"required":["id","name","filters"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/products/views/{id}":{"delete":{"operationId":"admin.products.removeView","summary":"Remove a saved product view","tags":["Admin — Catalog"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/products":{"post":{"operationId":"admin.products.create","summary":"Create a product with its options and variants","description":"Options, their values and every variant are created in one transaction. A variant must name exactly one value from each option.","tags":["Admin — Catalog"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string","default":"draft"},"kind":{"enum":["physical","appointment","session","package"],"type":"string","default":"physical"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"},"default":[]},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"},"default":[]},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]},"default":[]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["value"]}}},"required":["name","values"]},"default":[]},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"optionValues":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"valueId":{"type":"string"}},"required":["valueId"]},{"type":"object","properties":{"optionIndex":{"type":"number"},"valueIndex":{"type":"number"}},"required":["optionIndex","valueIndex"]}]},"default":[]},"openingQuantity":{"type":"number"}},"required":["pricePaisa"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["slug","title","variants"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"get":{"operationId":"admin.products.list","summary":"List products","tags":["Admin — Catalog"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["draft","active","archived","deleted"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"minPricePaisa","in":"query","schema":{"type":"number"},"allowEmptyValue":true,"allowReserved":true},{"name":"maxPricePaisa","in":"query","schema":{"type":"number"},"allowEmptyValue":true,"allowReserved":true},{"name":"available","in":"query","schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"vendor","in":"query","schema":{"type":"array","items":{"type":"string"}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"productType","in":"query","schema":{"type":"array","items":{"type":"string"}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"option","in":"query","schema":{"type":"array","items":{"type":"string"}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"collectionId","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"sort","in":"query","schema":{"enum":["newest","featured","updated","title_asc","price_asc","price_desc","inventory_asc"],"type":"string","default":"newest"},"allowEmptyValue":true,"allowReserved":true},{"name":"stock","in":"query","schema":{"enum":["in_stock","low_stock","partly_sold_out","out_of_stock","untracked"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"kind","in":"query","schema":{"enum":["physical","appointment","session","package","service"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"prices","in":"query","schema":{"enum":["stored","public"],"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"stock":{"type":"object","properties":{"state":{"enum":["in_stock","low_stock","partly_sold_out","out_of_stock","untracked"],"type":"string"},"available":{"anyOf":[{"type":"number"},{"type":"null"}]},"onHand":{"anyOf":[{"type":"number"},{"type":"null"}]},"variants":{"type":"number"},"tracked":{"type":"number"},"soldOut":{"type":"number"}},"required":["state","available","onHand","variants","tracked","soldOut"]}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt","stock"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"views":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"filters":{"type":"object","properties":{"q":{"type":"string"},"minPricePaisa":{"type":"number"},"maxPricePaisa":{"type":"number"},"available":{"type":"boolean"},"vendor":{"type":"array","items":{"type":"string"}},"productType":{"type":"array","items":{"type":"string"}},"option":{"type":"array","items":{"type":"string"}},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"collectionId":{"type":"string"},"stock":{"enum":["in_stock","low_stock","partly_sold_out","out_of_stock","untracked"],"type":"string"},"sort":{"enum":["newest","featured","updated","title_asc","price_asc","price_desc","inventory_asc"],"type":"string"}}}},"required":["id","name","filters"]}}},"required":["items","nextCursor","views"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/products/counts":{"get":{"operationId":"admin.products.counts","summary":"Count products by status","description":"Exact counts for the product list's views: every product that is not deleted, and how many are active, drafts or archived.","tags":["Admin — Catalog"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"all":{"type":"number"},"active":{"type":"number"},"draft":{"type":"number"},"archived":{"type":"number"}},"required":["all","active","draft","archived"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/products/filter-options":{"get":{"operationId":"admin.products.filterOptions","summary":"List the product list's filter choices","description":"The store's collections, and the brands and product types its products use, alphabetically. At most 200 of each.","tags":["Admin — Catalog"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"mode":{"enum":["manual","automated"],"type":"string"}},"required":["id","title"]}},"vendors":{"type":"array","items":{"type":"string"}},"productTypes":{"type":"array","items":{"type":"string"}}},"required":["collections","vendors","productTypes"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/product-editor":{"get":{"operationId":"admin.products.editor","summary":"Everything the product editor shows","description":"The product with its stock by location, collection choices and membership, related products' titles and the template picker's facts. Without `id`, what the create screen needs. Parts the caller may not read are null.","tags":["Admin — Catalog"],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]},{"type":"null"}]},"stock":{"anyOf":[{"type":"object","properties":{"locations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isDefault":{"type":"boolean"}},"required":["id","name","isDefault"]}},"levels":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"locationId":{"type":"string"},"onHand":{"type":"number"},"available":{"type":"number"}},"required":["variantId","locationId","onHand","available"]}}},"required":["locations","levels"]},{"type":"null"}]},"collections":{"anyOf":[{"type":"object","properties":{"choices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"automated":{"type":"boolean"}},"required":["id","title","automated"]}},"selected":{"type":"array","items":{"type":"string"}}},"required":["choices","selected"]},{"type":"null"}]},"relatedTitles":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"templates":{"anyOf":[{"type":"object","properties":{"fact":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"collectionIds":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","title","collectionIds","tags","productType"]},"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"pageType":{"enum":["home","product","collection","collection-list","page","article","blog","search","cart","account","not-found"],"type":"string"},"published":{"type":"boolean"}},"required":["id","title","pageType","published"]}},"set":{"anyOf":[{"type":"object","properties":{"default":{"anyOf":[{"type":"string"},{"type":"null"}]},"explicit":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"template":{"type":"string"},"include":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"any":{"const":true}},"required":["any"],"additionalProperties":false},{"type":"object","properties":{"inCollection":{"type":"string"}},"required":["inCollection"],"additionalProperties":false},{"type":"object","properties":{"hasTag":{"type":"string"}},"required":["hasTag"],"additionalProperties":false},{"type":"object","properties":{"productType":{"type":"string"}},"required":["productType"],"additionalProperties":false},{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":["ids"],"additionalProperties":false}]}},"exclude":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"any":{"const":true}},"required":["any"],"additionalProperties":false},{"type":"object","properties":{"inCollection":{"type":"string"}},"required":["inCollection"],"additionalProperties":false},{"type":"object","properties":{"hasTag":{"type":"string"}},"required":["hasTag"],"additionalProperties":false},{"type":"object","properties":{"productType":{"type":"string"}},"required":["productType"],"additionalProperties":false},{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":["ids"],"additionalProperties":false}]}}},"required":["id","template","include"],"additionalProperties":false}}},"required":["default"],"additionalProperties":false},{"type":"null"}]},"hasDraft":{"type":"boolean"}},"required":["fact","templates","set","hasDraft"]},{"type":"null"}]},"taxes":{"type":"object","properties":{"storeRateBps":{"type":"number"},"classes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rateBps":{"type":"number"}},"required":["id","name","rateBps"]}}},"required":["storeRateBps","classes"]}},"required":["product","stock","collections","relatedTitles","templates","taxes"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/products/{id}":{"get":{"operationId":"admin.products.get","summary":"Get a product","tags":["Admin — Catalog"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"patch":{"operationId":"admin.products.update","summary":"Update a product","description":"When `options` or `variants` are supplied they are reconciled in full: ids that exist are updated, new entries are created, and anything absent is deleted. Send a variant's id to preserve its identity — and, from SPEC-07, its stock.","tags":["Admin — Catalog"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["value"]}}},"required":["name","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"optionValues":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"valueId":{"type":"string"}},"required":["valueId"]},{"type":"object","properties":{"optionIndex":{"type":"number"},"valueIndex":{"type":"number"}},"required":["optionIndex","valueIndex"]}]},"default":[]},"openingQuantity":{"type":"number"}},"required":["pricePaisa"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.products.remove","summary":"Delete a product","tags":["Admin — Catalog"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"const":true}},"required":["id","deleted"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/products/{id}/images":{"put":{"operationId":"admin.products.setImages","summary":"Set the product's ordered image list","tags":["Admin — Catalog"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mediaIds":{"type":"array","items":{"type":"string"}}},"required":["mediaIds"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/products/{id}/collections":{"get":{"operationId":"admin.products.listCollections","summary":"List the collections a product is in","tags":["Admin — Catalog"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"mode":{"enum":["manual","automated"],"type":"string"}},"required":["id","title","status","mode"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"put":{"operationId":"admin.products.setCollections","summary":"Set the collections a product is in","description":"The complete set. A collection added here gets the product at the end of its order; the product leaves any collection not named.","tags":["Admin — Catalog"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collectionIds":{"type":"array","items":{"type":"string"}}},"required":["collectionIds"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"mode":{"enum":["manual","automated"],"type":"string"}},"required":["id","title","status","mode"]}}},"required":["items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/customers":{"post":{"operationId":"admin.customers.create","summary":"Create or match a customer","description":"Goes through the identity resolver, so submitting someone who already exists returns them rather than failing: email is matched first, then phone.","tags":["Admin — Customers & Discounts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string"},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"acceptsMarketing":{"type":"boolean","default":false},"note":{"type":"string"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"enum":["checkout","order","popup","newsletter","back_in_stock","contact","booking","enquiry","review","whatsapp","account","admin","pos","import"],"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptsMarketing":{"type":"boolean"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","email","phone","origin","firstName","lastName","acceptsMarketing","note","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"get":{"operationId":"admin.customers.list","summary":"List customers","tags":["Admin — Customers & Discounts"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"segment","in":"query","schema":{"enum":["returning","ordered","not_ordered"],"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"enum":["checkout","order","popup","newsletter","back_in_stock","contact","booking","enquiry","review","whatsapp","account","admin","pos","import"],"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptsMarketing":{"type":"boolean"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"orderCount":{"type":"number"},"spentPaisa":{"type":"number"},"lastOrderAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"emailSubscription":{"enum":["none","subscribed","unsubscribed"],"type":"string"}},"required":["id","email","phone","origin","firstName","lastName","acceptsMarketing","note","createdAt","updatedAt","orderCount","spentPaisa","lastOrderAt","emailSubscription"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/customers/counts":{"get":{"operationId":"admin.customers.counts","summary":"Count customers and subscribers","description":"Exact counts for the customer list: customers, returning customers (two or more placed orders, including cancellations), active newsletter subscribers and back-in-stock requests still waiting.","tags":["Admin — Customers & Discounts"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"customers":{"type":"number"},"returning":{"type":"number"},"emailSubscribers":{"type":"number"},"waitingForStock":{"type":"number"}},"required":["customers","returning","emailSubscribers","waitingForStock"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/customers/{id}":{"get":{"operationId":"admin.customers.get","summary":"Get a customer","tags":["Admin — Customers & Discounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"enum":["checkout","order","popup","newsletter","back_in_stock","contact","booking","enquiry","review","whatsapp","account","admin","pos","import"],"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptsMarketing":{"type":"boolean"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"risk":{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]}},"required":["id","email","phone","origin","firstName","lastName","acceptsMarketing","note","createdAt","updatedAt","risk"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"patch":{"operationId":"admin.customers.update","summary":"Update a customer","tags":["Admin — Customers & Discounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptsMarketing":{"type":"boolean"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"enum":["checkout","order","popup","newsletter","back_in_stock","contact","booking","enquiry","review","whatsapp","account","admin","pos","import"],"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptsMarketing":{"type":"boolean"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","email","phone","origin","firstName","lastName","acceptsMarketing","note","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.customers.remove","summary":"Delete a customer","description":"Retires the customer and their addresses; nothing is removed.","tags":["Admin — Customers & Discounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"const":true}},"required":["id","deleted"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/customers/{id}/journey":{"get":{"operationId":"admin.customers.journey","summary":"Get a customer's journey on the store","tags":["Admin — Customers & Discounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"firstTouch":{"anyOf":[{"type":"object","properties":{"landingPath":{"type":"string"},"referrerHost":{"anyOf":[{"type":"string"},{"type":"null"}]},"utmSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"utmMedium":{"anyOf":[{"type":"string"},{"type":"null"}]},"utmCampaign":{"anyOf":[{"type":"string"},{"type":"null"}]},"at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["landingPath","referrerHost","utmSource","utmMedium","utmCampaign","at"]},{"type":"null"}]},"events":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["page_view","cart_updated","checkout_started","form_submitted","search","order_placed","identified"],"type":"string"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]},"at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["kind","detail","at"]}}},"required":["firstTouch","events"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/customers/{customerId}/addresses":{"get":{"operationId":"admin.customers.listAddresses","summary":"List a customer's addresses","tags":["Admin — Customers & Discounts"],"parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"},"isDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","line1","line2","city","province","postalCode","landmark","country","recipientName","recipientPhone","isDefault","createdAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"post":{"operationId":"admin.customers.createAddress","summary":"Add an address","tags":["Admin — Customers & Discounts"],"parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string","default":""},"postalCode":{"type":"string","default":""},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string","default":"PK"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"},"isDefault":{"type":"boolean","default":false}},"required":["line1","city","recipientName","recipientPhone"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"},"isDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","line1","line2","city","province","postalCode","landmark","country","recipientName","recipientPhone","isDefault","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/customers/{customerId}/addresses/{addressId}":{"patch":{"operationId":"admin.customers.updateAddress","summary":"Update an address","tags":["Admin — Customers & Discounts"],"parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string"}},{"name":"addressId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"},"isDefault":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"},"isDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","line1","line2","city","province","postalCode","landmark","country","recipientName","recipientPhone","isDefault","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.customers.removeAddress","summary":"Delete an address","tags":["Admin — Customers & Discounts"],"parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string"}},{"name":"addressId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"const":true}},"required":["id","deleted"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/locations":{"get":{"operationId":"admin.inventory.listLocations","summary":"List locations","tags":["Admin — Inventory & Locations"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","isDefault","createdAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"post":{"operationId":"admin.inventory.createLocation","summary":"Create a location","tags":["Admin — Inventory & Locations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"isDefault":{"type":"boolean","default":false}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","isDefault","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/locations/{id}":{"patch":{"operationId":"admin.inventory.updateLocation","summary":"Update a location","tags":["Admin — Inventory & Locations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"isDefault":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","isDefault","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/inventory":{"get":{"operationId":"admin.inventory.listLevels","summary":"List stock levels","tags":["Admin — Inventory & Locations"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"locationId","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"stock","in":"query","schema":{"enum":["out","low","in"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"threshold","in":"query","schema":{"type":"number","default":5},"allowEmptyValue":true,"allowReserved":true},{"name":"sort","in":"query","schema":{"enum":["oldest","quantity-asc","quantity-desc"],"type":"string","default":"oldest"},"allowEmptyValue":true,"allowReserved":true},{"name":"variantId","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"productId","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"productId":{"type":"string"},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"locationId":{"type":"string"},"locationName":{"type":"string"},"onHand":{"type":"number"},"available":{"type":"number"}},"required":["variantId","productId","productTitle","variantTitle","sku","locationId","locationName","onHand","available"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/inventory/unstocked":{"get":{"operationId":"admin.inventory.listUnstocked","summary":"List tracked variants with no stock recorded anywhere","description":"Variants appear in `GET /inventory` once stock is first adjusted. These are the ones that have never been: a new product's variants, waiting for their first units.","tags":["Admin — Inventory & Locations"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"productId":{"type":"string"},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["variantId","productId","productTitle","variantTitle","sku"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/inventory/adjust":{"post":{"operationId":"admin.inventory.adjust","summary":"Adjust stock","description":"Writes a ledger entry and updates the level in one transaction. Use `mode: \"adjust\"` for a delta and `mode: \"set\"` for a stocktake — two people counting at once must not overwrite each other.","tags":["Admin — Inventory & Locations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"variantId":{"type":"string"},"locationId":{"type":"string"},"quantity":{"type":"number"},"mode":{"enum":["adjust","set"],"type":"string","default":"adjust"},"reason":{"enum":["received","sold","returned","damaged","lost","recount","correction"],"type":"string"},"note":{"type":"string"}},"required":["variantId","quantity","reason"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"variantId":{"type":"string"},"productId":{"type":"string"},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"locationId":{"type":"string"},"locationName":{"type":"string"},"onHand":{"type":"number"},"available":{"type":"number"}},"required":["variantId","productId","productTitle","variantTitle","sku","locationId","locationName","onHand","available"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/inventory/adjust-many":{"post":{"operationId":"admin.inventory.adjustMany","summary":"Adjust stock for many variants at once","description":"One transaction, one reason and note applied to every line — a stocktake across a whole product, or setting opening quantities. Locks level rows in the platform's standard order (variant, then location) so this cannot deadlock against a concurrent single adjustment or checkout.","tags":["Admin — Inventory & Locations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"enum":["received","sold","returned","damaged","lost","recount","correction"],"type":"string"},"note":{"type":"string"},"adjustments":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"locationId":{"type":"string"},"quantity":{"type":"number"},"mode":{"enum":["adjust","set"],"type":"string","default":"adjust"},"expectedOnHand":{"type":"number"}},"required":["variantId","quantity"]}}},"required":["reason","adjustments"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"levels":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"productId":{"type":"string"},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"locationId":{"type":"string"},"locationName":{"type":"string"},"onHand":{"type":"number"},"available":{"type":"number"}},"required":["variantId","productId","productTitle","variantTitle","sku","locationId","locationName","onHand","available"]}}},"required":["levels"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/inventory/adjustments":{"get":{"operationId":"admin.inventory.listAdjustments","summary":"List stock movements","description":"The append-only ledger. Entries are never edited or removed.","tags":["Admin — Inventory & Locations"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"variantId","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"locationId":{"type":"string"},"delta":{"type":"number"},"resultingOnHand":{"type":"number"},"reason":{"enum":["received","sold","returned","damaged","lost","recount","correction"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","variantId","locationId","delta","resultingOnHand","reason","note","actorId","actorName","createdAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders":{"post":{"operationId":"admin.orders.create","summary":"Create an order for a customer","description":"For orders taken by phone or WhatsApp. Goes through the same placement as storefront checkout: the customer is resolved, stock is reserved, and the order starts pending. Requires an `Idempotency-Key` header: a retry with the same key and body returns the original order instead of placing a second one.","tags":["Admin — Orders"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"quantity":{"type":"number"},"booking":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"const":"any"}],"default":"any"},"visitKey":{"type":"string"},"overbook":{"type":"boolean","default":false},"participants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"age":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","age"]}}},"required":["startsAt"]}},"required":["variantId","quantity"]}},"customer":{"type":"object","properties":{"phone":{"type":"string"},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["phone"]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string","default":""},"postalCode":{"type":"string","default":""},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string","default":"PK"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","recipientName","recipientPhone"]},{"type":"null"}],"default":null},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string","default":""},"postalCode":{"type":"string","default":""},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string","default":"PK"}},"required":["name","line1","city"]},{"type":"null"}]},"shippingRateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"type":"string"},"discountCodes":{"type":"array","items":{"type":"string"}},"manualDiscount":{"type":"object","properties":{"valueType":{"enum":["percentage","fixed_amount"],"type":"string"},"value":{"type":"number"},"reason":{"type":"string"}},"required":["valueType","value","reason"]},"requestAdvance":{"type":"boolean"}},"required":["lines","customer"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"get":{"operationId":"admin.orders.list","summary":"List orders","tags":["Admin — Orders"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["pending","confirmed","cancelled"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"paymentStatus","in":"query","schema":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"attention","in":"query","schema":{"enum":["to-confirm","on-hold","to-pack","with-courier","needs-attention","delivered","returned"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"sort","in":"query","schema":{"enum":["newest","oldest"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"discountCode","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"fulfillmentStatus","in":"query","schema":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"placed","in":"query","schema":{"enum":["today","7d","30d"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"lastOutcome","in":"query","schema":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"parcelStatus","in":"query","schema":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"riskTier","in":"query","schema":{"enum":["low","check","high"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"courierName","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"city","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"cancelReasonCode","in":"query","schema":{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"customerId","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"placedFrom","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"placedTo","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/quote":{"post":{"operationId":"admin.orders.quote","summary":"Price an order before creating it","tags":["Admin — Orders"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"quantity":{"type":"number"},"booking":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"const":"any"}],"default":"any"},"visitKey":{"type":"string"},"overbook":{"type":"boolean","default":false},"participants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"age":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","age"]}}},"required":["startsAt"]}},"required":["variantId","quantity"]}},"customer":{"type":"object","properties":{"phone":{"type":"string"},"email":{"type":"string"}}},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string","default":"PK"},"province":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingRateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"discountCodes":{"type":"array","items":{"type":"string"}},"manualDiscount":{"type":"object","properties":{"valueType":{"enum":["percentage","fixed_amount"],"type":"string"},"value":{"type":"number"},"reason":{"type":"string"}},"required":["valueType","value","reason"]}},"required":["lines"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"quantity":{"type":"number"},"unitPricePaisa":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]}},"required":["variantId","quantity","unitPricePaisa","linePaisa","discountPaisa","sale"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"discountCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"applied":{"type":"boolean"},"reason":{"anyOf":[{"enum":["not_found","disabled","not_started","expired","minimum_not_met","not_eligible_customer","usage_limit_reached","already_used_by_customer","does_not_apply_to_items","does_not_apply_to_shipping","not_combinable","sale_not_combinable"],"type":"string"},{"type":"null"}]}},"required":["code","applied","reason"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"shippingOptions":{"type":"array","items":{"type":"object","properties":{"rateId":{"type":"string"},"name":{"type":"string"},"pricePaisa":{"type":"number"},"free":{"type":"boolean"},"minDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"customsNote":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"required":["rateId","name","pricePaisa","free","minDays","maxDays"]}},"shippingRateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]}},"required":["lines","discounts","discountCodes","sales","shippingOptions","shippingRateId","totals"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/counts":{"get":{"operationId":"admin.orders.counts","summary":"Count orders needing attention","description":"Exact counts for a dashboard, without paging through lists: orders waiting for confirmation, and confirmed orders with units still to send.","tags":["Admin — Orders"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pending":{"type":"number"},"onHold":{"type":"number"},"awaitingFulfilment":{"type":"number"},"withCourier":{"type":"number"}},"required":["pending","onHold","awaitingFulfilment","withCourier"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/{id}":{"get":{"operationId":"admin.orders.get","summary":"Get an order with its event history","tags":["Admin — Orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/{id}/confirm":{"post":{"operationId":"admin.orders.confirm","summary":"Confirm a pending order","description":"Assigns the next gap-free invoice number. Stock stays reserved until fulfilment.","tags":["Admin — Orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/{id}/buyer-message":{"post":{"operationId":"admin.orders.buyerMessage","summary":"Create a buyer message link, replacing any previous link of that kind","tags":["Admin — Orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["placed","confirm","dispatched","delivered","review"],"type":"string"},"fulfillmentId":{"type":"string"}},"required":["kind"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["placed","confirm","dispatched","delivered","review"],"type":"string"},"text":{"type":"string"},"url":{"type":"string"},"whatsappUrl":{"type":"string"},"smsUrl":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["kind","text","url","whatsappUrl","smsUrl","expiresAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/{id}/cancel":{"post":{"operationId":"admin.orders.cancel","summary":"Cancel an order","description":"Releases reserved stock. A confirmed order keeps its invoice number, so the invoice sequence has no gaps. An order whose cash was collected cannot be cancelled.","tags":["Admin — Orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"},"reasonCode":{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"}},"required":["reason"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/{id}/notes":{"post":{"operationId":"admin.orders.addNote","summary":"Add a note to an order's history","tags":["Admin — Orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}},"required":["note"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/{id}/contacts":{"post":{"operationId":"admin.orders.logContact","summary":"Log a call or message to the buyer","description":"Pending orders only. `confirmed` releases any hold and confirms the order; `cancelled` cancels it as cancelled by the buyer; `prepay_only` puts it on hold for an advance payment. Other outcomes are recorded and leave the order waiting, optionally with a time to try again.","tags":["Admin — Orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"type":"string"},"followUpAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["channel","outcome"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/{id}/hold":{"post":{"operationId":"admin.orders.hold","summary":"Put an order on hold","description":"Pending or confirmed orders. A held order cannot be confirmed, packed or dispatched until it is released; it can still be cancelled. Replaces an existing hold.","tags":["Admin — Orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","other"],"type":"string"},"note":{"type":"string"}},"required":["reason"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/{id}/release":{"post":{"operationId":"admin.orders.release","summary":"Release an order's hold","description":"Returns the order to the queue it was in.","tags":["Admin — Orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/{id}/report":{"post":{"operationId":"admin.orders.report","summary":"Report a problem with an order","description":"Within 90 days of the order, one live report per order. The report counts against the buyer at your store like a refused delivery, and (from the reason only, never the note) toward devhelp Protect's network signal. Sends `order.reported`.","tags":["Admin — Orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"type":"string"}},"required":["reason"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/{id}/report/withdraw":{"post":{"operationId":"admin.orders.withdrawReport","summary":"Withdraw an order's report","description":"Owners and admins. Removes the report from the buyer's record and from the network on the next run. Sends `order.report_withdrawn`.","tags":["Admin — Orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/{id}/protect-mistake":{"post":{"operationId":"admin.orders.reportProtectMistake","summary":"Report a mistaken devhelp Protect line","description":"For an order whose devhelp Protect line looks wrong; devhelp reviews it.","tags":["Admin — Orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/{id}/delivery":{"patch":{"operationId":"admin.orders.updateDelivery","summary":"Correct a pending order's delivery details","description":"Before confirmation only. Changes the order alone: its delivery fee and totals stay as placed, and the customer record is untouched. The change is recorded on the order's history with the previous details.","tags":["Admin — Orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string","default":""},"postalCode":{"type":"string","default":""},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string","default":"PK"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["phone","recipientName","recipientPhone","line1","line2","city","landmark"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/{id}/exchanges":{"post":{"operationId":"admin.orders.exchange","summary":"Exchange delivered items","description":"Records the returned units on this order (restocked or written off, with an optional refund) and places a linked replacement order through normal placement: stock is reserved and it gets its own number. A credit for the returned units' value is applied, so the buyer pays only the difference (delivery is free; a cash-on-delivery fee still applies). The replacement is confirmed at once. Requires an `Idempotency-Key` header.","tags":["Admin — Orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"returned":{"type":"array","items":{"type":"object","properties":{"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["orderLineItemId","quantity","restock"]}},"replacements":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"quantity":{"type":"number"}},"required":["variantId","quantity"]}},"reason":{"type":"string"},"refundPaisa":{"type":"number","default":0}},"required":["returned","replacements","reason"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"original":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]},"exchange":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}},"required":["original","exchange"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/{id}/refunds":{"post":{"operationId":"admin.orders.refund","summary":"Refund an online payment through its provider","description":"Requires an `Idempotency-Key` header. Refunds the order's captured online payment, fully or partly, through the provider that took it. Cash-on-delivery orders are refunded by recording a return or a cash refund instead. A provider that cannot refund is a conflict.","tags":["Admin — Orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attemptId":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"}},"required":["amountPaisa","reason"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/{id}/cash-refunds":{"post":{"operationId":"admin.orders.recordCashRefund","summary":"Record a cash refund without a return","description":"Cash-on-delivery orders only. The amount may not exceed the cash collected less earlier refunds. Records the refund on the order's history and sends `refund.created`. Requires an `Idempotency-Key` header.","tags":["Admin — Orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"type":"string"}},"required":["amountPaisa","reason"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/{id}/fulfillments":{"post":{"operationId":"admin.fulfillments.create","summary":"Pack a parcel","description":"Allocates quantities of the order's lines to a new parcel. The order must be confirmed, and no line may be allocated beyond what was ordered. Stock stays reserved until dispatch. Requires an `Idempotency-Key` header.","tags":["Admin — Orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"orderLineItemId":{"type":"string"},"quantity":{"type":"number"}},"required":["orderLineItemId","quantity"]}},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"courierName":{"type":"string"},"trackingNumber":{"type":"string"},"codAmountPaisa":{"type":"number"},"note":{"type":"string"}},"required":["lines"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/fulfillments/{id}/dispatch":{"post":{"operationId":"admin.fulfillments.dispatch","summary":"Hand a parcel to the courier","description":"Commits the parcel's reservations and takes its units off the shelf. A courier name is required.","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"courierName":{"type":"string"},"trackingNumber":{"type":"string"},"codAmountPaisa":{"type":"number"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/fulfillments/{id}/deliver":{"post":{"operationId":"admin.fulfillments.deliver","summary":"Record delivery and the cash collected","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"collectedPaisa":{"type":"number"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/fulfillments/{id}/rto":{"post":{"operationId":"admin.fulfillments.rto","summary":"Record a parcel coming back undelivered","description":"Return to origin. Nothing is restocked yet: receive the parcel to decide what goes back on the shelf. Counts against the customer's RTO record.","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/fulfillments/{id}/receive":{"post":{"operationId":"admin.fulfillments.receive","summary":"Receive a returned parcel back into stock","description":"For every line, restocked plus damaged must equal the quantity in the parcel.","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"fulfillmentLineId":{"type":"string"},"restockedQuantity":{"type":"number"},"damagedQuantity":{"type":"number"}},"required":["fulfillmentLineId","restockedQuantity","damagedQuantity"]}}},"required":["lines"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/fulfillments/{id}/cancel":{"post":{"operationId":"admin.fulfillments.cancel","summary":"Unpack a parcel that has not been dispatched","description":"Its lines become available to pack again; stock stays reserved.","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/orders/{id}/returns":{"post":{"operationId":"admin.fulfillments.createReturn","summary":"Record a return after delivery, with the refund given","description":"No more of a line may be returned than was delivered, and the refund may not exceed the cash collected less earlier refunds. Requires an `Idempotency-Key` header.","tags":["Admin — Orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["orderLineItemId","quantity","restock"]}},"refundPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"type":"string"}},"required":["lines","refundPaisa","reason"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/fulfillments":{"get":{"operationId":"admin.fulfillments.list","summary":"List parcels","description":"Parcels across orders, oldest first: `packed` (waiting for a courier), `with-courier` (dispatched), `needs-attention` (dispatched with no delivery or return recorded for the store's no-news days) or `all`.","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"view","in":"query","schema":{"enum":["packed","with-courier","needs-answer","needs-attention","all"],"type":"string","default":"packed"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"deliveryServiceId","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"courierName","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"packedFrom","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"packedTo","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"pieces":{"type":"number"},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"handover":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"}},"required":["id","number"]},{"type":"null"}]},"lastAttempt":{"anyOf":[{"type":"object","properties":{"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"answered":{"type":"boolean"}},"required":["number","reason","respondBy","answered"]},{"type":"null"}]},"order":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"recipientName":{"type":"string"},"phone":{"type":"string"},"city":{"type":"string"},"province":{"type":"string"},"onHold":{"type":"boolean"}},"required":["id","orderNumber","recipientName","phone","city","province","onHold"]}},"required":["id","status","courierName","deliveryServiceId","trackingNumber","trackingUrl","codAmountPaisa","collectedPaisa","pieces","packedAt","dispatchedAt","deliveredAt","handover","lastAttempt","order"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/fulfillments/counts":{"get":{"operationId":"admin.fulfillments.counts","summary":"Count parcels by what they wait for","tags":["Admin — Fulfillments & Shipping"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"packed":{"type":"number"},"withCourier":{"type":"number"},"needsAttention":{"type":"number"},"needsAnswer":{"type":"number"}},"required":["packed","withCourier","needsAttention","needsAnswer"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/fulfillments/{id}/attempts":{"post":{"operationId":"admin.fulfillments.recordAttempt","summary":"Record a failed delivery attempt","description":"A dispatched parcel only, and only while its last attempt has been answered. The attempt is numbered and waits for an answer (Needs answer).","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"type":"string"},"respondBy":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/fulfillments/{id}/instruction":{"post":{"operationId":"admin.fulfillments.instruct","summary":"Answer a failed delivery attempt","description":"`retry` records the instruction to try again, optionally with a new phone, address line or landmark kept on the attempt (the order's address is unchanged). `return` sends the parcel back through the same path as marking it returning. The merchant passes the instruction to the courier.","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"instruction":{"anyOf":[{"const":"retry"},{"const":"return"}]},"phone":{"type":"string"},"addressLine":{"type":"string"},"landmark":{"type":"string"},"note":{"type":"string"}},"required":["instruction"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/fulfillments/{id}/attempts/{number}/dispute":{"post":{"operationId":"admin.fulfillments.disputeAttempt","summary":"Mark a delivery attempt disputed","description":"The buyer says nobody came. Kept with a note, for the courier's record.","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"number","in":"path","required":true,"schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}},"required":["note"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/fulfillments/{id}/lost":{"post":{"operationId":"admin.fulfillments.markLost","summary":"Record a parcel as lost","description":"From dispatched or returning. No cash is collected and nothing is restocked. By default stock is held for a replacement and the parcel's lines can be packed again; refused when there is not enough stock, in which case `replace: false` records the loss alone.","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"},"replace":{"type":"boolean","default":true}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/fulfillments/{id}/claims":{"post":{"operationId":"admin.fulfillments.createClaim","summary":"Record a claim to the courier","description":"For a lost parcel, or a damaged one that was delivered or came back. A record only: the order's money is unchanged when the claim is paid.","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"type":"string","format":"date-time","x-native-type":"date"},"note":{"type":"string"}},"required":["kind","claimedPaisa"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"invoiceNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"enum":["pending","confirmed","cancelled"],"type":"string"},"paymentMethod":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"paymentStatus":{"enum":["pending","collected","cancelled","partially_collected","partially_refunded","refunded"],"type":"string"},"fulfillmentStatus":{"enum":["unfulfilled","partially_fulfilled","fulfilled"],"type":"string"},"source":{"enum":["storefront","admin","pos"],"type":"string"},"fulfilmentMethod":{"enum":["ship","in_person"],"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"recipientName":{"type":"string"},"recipientPhone":{"type":"string"}},"required":["line1","city","province","postalCode","landmark","country","recipientName","recipientPhone"]},{"type":"null"}]},"billingAddress":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"line1":{"type":"string"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"}},"required":["name","line1","line2","city","province","postalCode","country"]},{"type":"null"}]},"shippingRateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingMinDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingMaxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"productHandle":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","alt"]},{"type":"null"}]},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unitPricePaisa":{"type":"number"},"quantity":{"type":"number"},"linePaisa":{"type":"number"},"discountPaisa":{"type":"number"},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"originalUnitPricePaisa":{"type":"number"}},"required":["discountId","title","originalUnitPricePaisa"]},{"type":"null"}]},"booking":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"lineId":{"type":"string"},"kind":{"enum":["appointment","session","package"],"type":"string"},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"type":"string","format":"date-time","x-native-type":"date"},"staffId":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffName":{"anyOf":[{"type":"string"},{"type":"null"}]},"staffRequested":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"status":{"enum":["held","booked","arrived","completed","no_show","cancelled"],"type":"string"},"quantity":{"type":"number"},"arrivedQuantity":{"type":"number"},"overbooked":{"type":"boolean"},"checkCode":{"type":"string"},"version":{"type":"number"},"changeUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"requestedStaffId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","orderId","lineId","kind","startsAt","endsAt","staffId","staffName","staffRequested","resourceIds","status","quantity","arrivedQuantity","overbooked","checkCode","version","changeUntil","requestedStaffId"]},{"type":"null"}]},"tax":{"anyOf":[{"type":"object","properties":{"rateBps":{"type":"number"},"taxPaisa":{"type":"number"}},"required":["rateBps","taxPaisa"]},{"type":"null"}]}},"required":["id","variantId","productTitle","variantTitle","sku","unitPricePaisa","quantity","linePaisa","discountPaisa","sale","booking"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"type":"number"}},"required":["discountId","code","title","type","valueType","value","amountPaisa"]}},"sales":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"amountPaisa":{"type":"number"}},"required":["discountId","title","amountPaisa"]}},"totals":{"type":"object","properties":{"currency":{"enum":["PKR"],"type":"string"},"subtotalPaisa":{"type":"number"},"shippingPaisa":{"type":"number"},"discountPaisa":{"type":"number"},"saleSavingsPaisa":{"type":"number"},"shippingDiscountPaisa":{"type":"number"},"codFeePaisa":{"type":"number"},"taxPaisa":{"type":"number"},"totalPaisa":{"type":"number"},"taxRateBps":{"type":"number"},"pricesIncludeTax":{"type":"boolean"}},"required":["currency","subtotalPaisa","shippingPaisa","discountPaisa","saleSavingsPaisa","shippingDiscountPaisa","codFeePaisa","taxPaisa","totalPaisa","taxRateBps","pricesIncludeTax"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"payment":{"type":"object","properties":{"method":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"state":{"enum":["not_required","awaiting","paid","failed","expired","refunded"],"type":"string"},"testMode":{"type":"boolean"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"canRetry":{"type":"boolean"},"canSwitchToCod":{"type":"boolean"},"codTotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"depositPaisa":{"type":"number"},"advance":{"anyOf":[{"type":"object","properties":{"dueAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"received":{"type":"boolean"}},"required":["dueAt","received"]},{"type":"null"}]}},"required":["method","state","testMode","dueAt","canRetry","canSwitchToCod","codTotalPaisa","depositPaisa","advance"]},"bookingPolicy":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"cancelWindowHours":{"type":"number"},"canCancel":{"type":"boolean"},"canReschedule":{"type":"boolean"},"advanceInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","cancelWindowHours","canCancel","canReschedule","advanceInstructions"]},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"risk":{"anyOf":[{"type":"object","properties":{"orderCount":{"type":"number"},"deliveredCount":{"type":"number"},"rtoCount":{"type":"number"},"cancelledCount":{"type":"number"},"returnedCount":{"type":"number"},"rtoRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["orderCount","deliveredCount","rtoCount","cancelledCount","returnedCount","rtoRate"]},{"type":"null"}]},"collectedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"fulfillments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restockedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"damagedQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","orderLineItemId","quantity","restockedQuantity","damagedQuantity"]}},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"rtoAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"replaced":{"type":"boolean"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"instruction":{"anyOf":[{"enum":["retry","return"],"type":"string"},{"type":"null"}]},"instructedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"retryPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryAddressLine":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryLandmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"disputed":{"type":"boolean"},"disputeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","reason","note","respondBy","instruction","instructedAt","retryPhone","retryAddressLine","retryLandmark","disputed","disputeNote","actorType","createdAt"]}},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt"]}}},"required":["id","deliveryServiceId","trackingUrl","status","courierName","trackingNumber","handoverId","codAmountPaisa","collectedPaisa","note","lines","packedAt","dispatchedAt","deliveredAt","rtoAt","receivedAt","cancelledAt","lostAt","replaced","attempts","claims"]}},"returns":{"type":"array","items":{"type":"object","properties":{"exchangeOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"reason":{"type":"string"},"refundPaisa":{"type":"number"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineItemId":{"type":"string"},"quantity":{"type":"number"},"restock":{"type":"boolean"}},"required":["id","orderLineItemId","quantity","restock"]}},"atRegister":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"registerId":{"type":"string"},"receiptNumber":{"type":"string"},"refunds":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","amountPaisa","reference"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","registerId","receiptNumber","refunds"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exchangeOrderId","id","reason","refundPaisa","note","lines","atRegister","createdAt"]}},"cashRefunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","note","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["placed","confirmed","cancelled","payment_collected","payment_cancelled","note_added","fulfillment_packed","fulfillment_dispatched","fulfillment_delivered","fulfillment_rto","fulfillment_received","fulfillment_cancelled","return_recorded","payment_started","payment_captured","payment_failed","payment_refunded","payment_expired","payment_method_changed","buyer_message_offered","contact_logged","held","released","delivery_changed","fulfillment_attempt_failed","fulfillment_instructed","fulfillment_attempt_disputed","fulfillment_lost","exchange_recorded","claim_recorded","claim_updated","cash_refund_recorded","booking_booked","booking_rescheduled","booking_arrived","booking_completed","booking_no_show","booking_cancelled","booking_checked_in","venue_payment_recorded","items_edited"],"type":"string"},"fromStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"toStatus":{"anyOf":[{"enum":["pending","confirmed","cancelled"],"type":"string"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","fromStatus","toStatus","actorType","actorId","note","createdAt"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["cod","test","safepay","stripe","alfalah","in_person","venue"],"type":"string"},"providerLabel":{"type":"string"},"mode":{"enum":["test","live"],"type":"string"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["created","open","succeeded","failed","cancelled","expired","partially_refunded","refunded"],"type":"string"},"amountPaisa":{"type":"number"},"capturedPaisa":{"type":"number"},"refundedPaisa":{"type":"number"},"currency":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequired":{"type":"boolean"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amountPaisa":{"type":"number"},"reason":{"type":"string"},"status":{"enum":["pending","succeeded","failed"],"type":"string"},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","amountPaisa","reason","status","failureMessage","createdAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","providerLabel","mode","providerRef","status","amountPaisa","capturedPaisa","refundedPaisa","currency","expiresAt","failureMessage","cardBrand","cardLast4","refundRequired","refunds","createdAt","updatedAt"]}},"cancelReasonCode":{"anyOf":[{"enum":["buyer_cancelled","unreachable","fake_order","out_of_stock","pricing_error","other"],"type":"string"},{"type":"null"}]},"exchangeOfOrderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"type":"object","properties":{"hold":{"anyOf":[{"type":"object","properties":{"reason":{"enum":["advance_payment","waiting_for_buyer","address_check","unanswered","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["reason","note","heldAt"]},{"type":"null"}]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["call","whatsapp","sms"],"type":"string"},"outcome":{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","channel","outcome","note","followUpAt","actorType","createdAt"]}},"attempts":{"type":"number"},"unanswered":{"type":"number"},"lastOutcome":{"anyOf":[{"enum":["confirmed","no_answer","call_later","wrong_number","wants_changes","prepay_only","cancelled"],"type":"string"},{"type":"null"}]},"lastContactAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"followUpAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"risk":{"type":"object","properties":{"tier":{"enum":["low","check","high"],"type":"string"},"reasons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"past_rto"},"count":{"type":"number"},"rate":{"type":"number"}},"required":["code","count","rate"]},{"type":"object","properties":{"code":{"const":"past_cancellations"},"count":{"type":"number"}},"required":["code","count"]},{"type":"object","properties":{"code":{"const":"high_value"},"thresholdPaisa":{"type":"number"}},"required":["code","thresholdPaisa"]},{"type":"object","properties":{"code":{"const":"reported"},"count":{"type":"number"}},"required":["code","count"]}]}},"network":{"anyOf":[{"type":"object","properties":{"level":{"enum":["caution","high"],"type":"string"},"reason":{"enum":["flagged_by_devhelp","refused_deliveries","fake_orders","reported_by_stores","unreachable","return_abuse","many_stores_quickly"],"type":"string"}},"required":["level","reason"]},{"type":"null"}]},"deliveredHere":{"type":"boolean"},"suggestedAdvancePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["tier","reasons","network","deliveredHere","suggestedAdvancePaisa"]},"report":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["fake_order","refused_no_reason","scam_or_abuse","return_abuse","wrong_details","other"],"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","reason","note","reportedAt"]},{"type":"null"}]}},"required":["hold","contacts","attempts","unanswered","lastOutcome","lastContactAt","followUpAt","risk","report"]},"inStore":{"anyOf":[{"type":"object","properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"registerId":{"type":"string"},"registerName":{"type":"string"},"receiptNumber":{"type":"string"},"cashRoundingPaisa":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["cash","card_machine","qr","bank_transfer","gift_voucher","cheque","other"],"type":"string"},"name":{"type":"string"},"amountPaisa":{"type":"number"},"tenderedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"changePaisa":{"type":"number"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","amountPaisa","tenderedPaisa","changePaisa","reference","createdAt"]}},"fiscal":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","fiscalized","rejected","unknown"],"type":"string"},"usin":{"type":"string"},"posId":{"type":"string"},"environment":{"enum":["sandbox","production"],"type":"string"},"fbrInvoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","usin","posId","environment","fbrInvoiceNumber"]},{"type":"null"}]}},"required":["locationId","locationName","registerId","registerName","receiptNumber","cashRoundingPaisa","payments"]},{"type":"null"}]}},"required":["id","orderNumber","invoiceNumber","status","paymentMethod","paymentStatus","fulfillmentStatus","source","fulfilmentMethod","email","phone","shippingAddress","billingAddress","shippingRateName","shippingMinDays","shippingMaxDays","lines","discounts","sales","totals","note","confirmedAt","cancelledAt","createdAt","updatedAt","payment","bookingPolicy","customerId","risk","collectedPaisa","refundedPaisa","fulfillments","returns","cashRefunds","events","payments","cancelReasonCode","exchangeOfOrderId","confirmation","inStore"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/claims":{"get":{"operationId":"admin.claims.list","summary":"List claims, oldest open first","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["open","paid","refused"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"courierName","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"writtenOffPaisa":{"type":"number"},"fulfillmentId":{"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"}},"required":["id","orderNumber"]},"carriedTo":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["open","paid","refused"],"type":"string"}},"required":["id","status"]},{"type":"null"}]},"carriedFrom":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"null"}]}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt","fulfillmentId","courierName","trackingNumber","order","carriedTo","carriedFrom"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/claims/{id}":{"patch":{"operationId":"admin.claims.update","summary":"Record the courier's answer to a claim","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rest":{"enum":["claim","write_off"],"type":"string"},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"type":"number"},"note":{"type":"string"}},"required":["status"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["lost","damaged","other"],"type":"string"},"claimedPaisa":{"type":"number"},"claimBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"status":{"enum":["open","paid","refused"],"type":"string"},"paidPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"writtenOffPaisa":{"type":"number"},"fulfillmentId":{"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"}},"required":["id","orderNumber"]},"carriedTo":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["open","paid","refused"],"type":"string"}},"required":["id","status"]},{"type":"null"}]},"carriedFrom":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"null"}]}},"required":["id","kind","claimedPaisa","claimBy","status","paidPaisa","note","resolvedAt","createdAt","fulfillmentId","courierName","trackingNumber","order","carriedTo","carriedFrom"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/handovers":{"post":{"operationId":"admin.handovers.create","summary":"Hand packed parcels to a courier","description":"Dispatches each parcel through the same path as a single dispatch, with the chosen delivery service or courier name and an optional tracking number per parcel, and records them as one numbered handover for the load sheet. A parcel already dispatched on its own, with the same courier and on no handover, is recorded on this one instead (its tracking number filled in if it had none). A parcel that cannot be dispatched (not packed, its order on hold) is left out and listed in `failed`; if none can be, nothing is recorded. Requires an `Idempotency-Key` header.","tags":["Admin — Fulfillments & Shipping"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"courierName":{"type":"string"},"note":{"type":"string"},"parcels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackingNumber":{"type":"string"},"trackingUrl":{"type":"string"}},"required":["id"]}}},"required":["parcels"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"handover":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"courierName":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"handedOverAt":{"type":"string","format":"date-time","x-native-type":"date"},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"parcelCount":{"type":"number"},"pieces":{"type":"number"},"codTotalPaisa":{"type":"number"},"parcels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"pieces":{"type":"number"},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"handover":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"}},"required":["id","number"]},{"type":"null"}]},"lastAttempt":{"anyOf":[{"type":"object","properties":{"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"answered":{"type":"boolean"}},"required":["number","reason","respondBy","answered"]},{"type":"null"}]},"order":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"recipientName":{"type":"string"},"phone":{"type":"string"},"city":{"type":"string"},"province":{"type":"string"},"onHold":{"type":"boolean"}},"required":["id","orderNumber","recipientName","phone","city","province","onHold"]}},"required":["id","status","courierName","deliveryServiceId","trackingNumber","trackingUrl","codAmountPaisa","collectedPaisa","pieces","packedAt","dispatchedAt","deliveredAt","handover","lastAttempt","order"]}}},"required":["id","number","courierName","deliveryServiceId","note","handedOverAt","actorType","parcelCount","pieces","codTotalPaisa","parcels"]},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}}},"required":["handover","failed"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"get":{"operationId":"admin.handovers.list","summary":"List handovers, newest first","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"courierName":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"handedOverAt":{"type":"string","format":"date-time","x-native-type":"date"},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"parcelCount":{"type":"number"},"pieces":{"type":"number"},"codTotalPaisa":{"type":"number"}},"required":["id","number","courierName","deliveryServiceId","note","handedOverAt","actorType","parcelCount","pieces","codTotalPaisa"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/handovers/{id}":{"get":{"operationId":"admin.handovers.get","summary":"Get a handover with its parcels","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"courierName":{"type":"string"},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"handedOverAt":{"type":"string","format":"date-time","x-native-type":"date"},"actorType":{"enum":["customer","staff","api_key","system"],"type":"string"},"parcelCount":{"type":"number"},"pieces":{"type":"number"},"codTotalPaisa":{"type":"number"},"parcels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["packed","dispatched","delivered","returning","returned","cancelled","lost"],"type":"string"},"courierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveryServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"codAmountPaisa":{"type":"number"},"collectedPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"pieces":{"type":"number"},"packedAt":{"type":"string","format":"date-time","x-native-type":"date"},"dispatchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"handover":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"}},"required":["id","number"]},{"type":"null"}]},"lastAttempt":{"anyOf":[{"type":"object","properties":{"number":{"type":"number"},"reason":{"enum":["buyer_unavailable","refused","address_problem","phone_off","deliver_later","other"],"type":"string"},"respondBy":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"answered":{"type":"boolean"}},"required":["number","reason","respondBy","answered"]},{"type":"null"}]},"order":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"number"},"recipientName":{"type":"string"},"phone":{"type":"string"},"city":{"type":"string"},"province":{"type":"string"},"onHold":{"type":"boolean"}},"required":["id","orderNumber","recipientName","phone","city","province","onHold"]}},"required":["id","status","courierName","deliveryServiceId","trackingNumber","trackingUrl","codAmountPaisa","collectedPaisa","pieces","packedAt","dispatchedAt","deliveredAt","handover","lastAttempt","order"]}}},"required":["id","number","courierName","deliveryServiceId","note","handedOverAt","actorType","parcelCount","pieces","codTotalPaisa","parcels"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/webhooks":{"post":{"operationId":"admin.webhooks.create","summary":"Create a webhook endpoint","description":"Returns the signing secret. It is shown only here and after a rotation. The URL must be https and must not resolve to a private address.","tags":["Admin — Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"topics":{"type":"array","items":{"enum":["blog.updated","review.updated","message.updated","order.placed","order.confirmed","order.receipt_requested","order.cancelled","order.reported","order.report_withdrawn","fulfillment.created","fulfillment.dispatched","fulfillment.delivered","fulfillment.rto","fulfillment.received","fulfillment.cancelled","fulfillment.lost","return.created","refund.created","inventory.low_stock","inventory.out_of_stock","inventory.back_in_stock","product.created","product.updated","product.deleted","collection.created","collection.updated","collection.deleted","discount.created","discount.updated","discount.deleted","sale.started","sale.ended","customer.created","customer.updated","customer.deleted","checkout.updated","checkout.abandoned","contact.subscribed","page.created","page.updated","page.deleted","menu.updated","redirect.created","redirect.updated","redirect.deleted","store.updated","faq.updated","booking_setup.updated","enquiry.created","booking.booked","booking.rescheduled","booking.cancelled","booking.arrived","booking.completed","booking.no_show","booking.payment_recorded","site.published","payment.succeeded","payment.failed","payment.refunded","order.payment_expired","app.installed","app.uninstalled","app.updated"],"type":"string"}},"description":{"type":"string"}},"required":["url","topics"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"topics":{"type":"array","items":{"enum":["blog.updated","review.updated","message.updated","order.placed","order.confirmed","order.receipt_requested","order.cancelled","order.reported","order.report_withdrawn","fulfillment.created","fulfillment.dispatched","fulfillment.delivered","fulfillment.rto","fulfillment.received","fulfillment.cancelled","fulfillment.lost","return.created","refund.created","inventory.low_stock","inventory.out_of_stock","inventory.back_in_stock","product.created","product.updated","product.deleted","collection.created","collection.updated","collection.deleted","discount.created","discount.updated","discount.deleted","sale.started","sale.ended","customer.created","customer.updated","customer.deleted","checkout.updated","checkout.abandoned","contact.subscribed","page.created","page.updated","page.deleted","menu.updated","redirect.created","redirect.updated","redirect.deleted","store.updated","faq.updated","booking_setup.updated","enquiry.created","booking.booked","booking.rescheduled","booking.cancelled","booking.arrived","booking.completed","booking.no_show","booking.payment_recorded","site.published","payment.succeeded","payment.failed","payment.refunded","order.payment_expired","app.installed","app.uninstalled","app.updated"],"type":"string"}},"status":{"enum":["active","disabled","deleted"],"type":"string"},"disabledReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"previousSecretExpiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"secret":{"type":"string"}},"required":["id","url","description","topics","status","disabledReason","previousSecretExpiresAt","createdAt","updatedAt","secret"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"get":{"operationId":"admin.webhooks.list","summary":"List webhook endpoints","tags":["Admin — Webhooks"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"topics":{"type":"array","items":{"enum":["blog.updated","review.updated","message.updated","order.placed","order.confirmed","order.receipt_requested","order.cancelled","order.reported","order.report_withdrawn","fulfillment.created","fulfillment.dispatched","fulfillment.delivered","fulfillment.rto","fulfillment.received","fulfillment.cancelled","fulfillment.lost","return.created","refund.created","inventory.low_stock","inventory.out_of_stock","inventory.back_in_stock","product.created","product.updated","product.deleted","collection.created","collection.updated","collection.deleted","discount.created","discount.updated","discount.deleted","sale.started","sale.ended","customer.created","customer.updated","customer.deleted","checkout.updated","checkout.abandoned","contact.subscribed","page.created","page.updated","page.deleted","menu.updated","redirect.created","redirect.updated","redirect.deleted","store.updated","faq.updated","booking_setup.updated","enquiry.created","booking.booked","booking.rescheduled","booking.cancelled","booking.arrived","booking.completed","booking.no_show","booking.payment_recorded","site.published","payment.succeeded","payment.failed","payment.refunded","order.payment_expired","app.installed","app.uninstalled","app.updated"],"type":"string"}},"status":{"enum":["active","disabled","deleted"],"type":"string"},"disabledReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"previousSecretExpiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","url","description","topics","status","disabledReason","previousSecretExpiresAt","createdAt","updatedAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/webhooks/{id}":{"get":{"operationId":"admin.webhooks.get","summary":"Get a webhook endpoint","tags":["Admin — Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"topics":{"type":"array","items":{"enum":["blog.updated","review.updated","message.updated","order.placed","order.confirmed","order.receipt_requested","order.cancelled","order.reported","order.report_withdrawn","fulfillment.created","fulfillment.dispatched","fulfillment.delivered","fulfillment.rto","fulfillment.received","fulfillment.cancelled","fulfillment.lost","return.created","refund.created","inventory.low_stock","inventory.out_of_stock","inventory.back_in_stock","product.created","product.updated","product.deleted","collection.created","collection.updated","collection.deleted","discount.created","discount.updated","discount.deleted","sale.started","sale.ended","customer.created","customer.updated","customer.deleted","checkout.updated","checkout.abandoned","contact.subscribed","page.created","page.updated","page.deleted","menu.updated","redirect.created","redirect.updated","redirect.deleted","store.updated","faq.updated","booking_setup.updated","enquiry.created","booking.booked","booking.rescheduled","booking.cancelled","booking.arrived","booking.completed","booking.no_show","booking.payment_recorded","site.published","payment.succeeded","payment.failed","payment.refunded","order.payment_expired","app.installed","app.uninstalled","app.updated"],"type":"string"}},"status":{"enum":["active","disabled","deleted"],"type":"string"},"disabledReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"previousSecretExpiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","url","description","topics","status","disabledReason","previousSecretExpiresAt","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"patch":{"operationId":"admin.webhooks.update","summary":"Update a webhook endpoint","description":"Re-enabling an endpoint resumes its pending deliveries.","tags":["Admin — Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"topics":{"type":"array","items":{"enum":["blog.updated","review.updated","message.updated","order.placed","order.confirmed","order.receipt_requested","order.cancelled","order.reported","order.report_withdrawn","fulfillment.created","fulfillment.dispatched","fulfillment.delivered","fulfillment.rto","fulfillment.received","fulfillment.cancelled","fulfillment.lost","return.created","refund.created","inventory.low_stock","inventory.out_of_stock","inventory.back_in_stock","product.created","product.updated","product.deleted","collection.created","collection.updated","collection.deleted","discount.created","discount.updated","discount.deleted","sale.started","sale.ended","customer.created","customer.updated","customer.deleted","checkout.updated","checkout.abandoned","contact.subscribed","page.created","page.updated","page.deleted","menu.updated","redirect.created","redirect.updated","redirect.deleted","store.updated","faq.updated","booking_setup.updated","enquiry.created","booking.booked","booking.rescheduled","booking.cancelled","booking.arrived","booking.completed","booking.no_show","booking.payment_recorded","site.published","payment.succeeded","payment.failed","payment.refunded","order.payment_expired","app.installed","app.uninstalled","app.updated"],"type":"string"}},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["active","disabled"],"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"topics":{"type":"array","items":{"enum":["blog.updated","review.updated","message.updated","order.placed","order.confirmed","order.receipt_requested","order.cancelled","order.reported","order.report_withdrawn","fulfillment.created","fulfillment.dispatched","fulfillment.delivered","fulfillment.rto","fulfillment.received","fulfillment.cancelled","fulfillment.lost","return.created","refund.created","inventory.low_stock","inventory.out_of_stock","inventory.back_in_stock","product.created","product.updated","product.deleted","collection.created","collection.updated","collection.deleted","discount.created","discount.updated","discount.deleted","sale.started","sale.ended","customer.created","customer.updated","customer.deleted","checkout.updated","checkout.abandoned","contact.subscribed","page.created","page.updated","page.deleted","menu.updated","redirect.created","redirect.updated","redirect.deleted","store.updated","faq.updated","booking_setup.updated","enquiry.created","booking.booked","booking.rescheduled","booking.cancelled","booking.arrived","booking.completed","booking.no_show","booking.payment_recorded","site.published","payment.succeeded","payment.failed","payment.refunded","order.payment_expired","app.installed","app.uninstalled","app.updated"],"type":"string"}},"status":{"enum":["active","disabled","deleted"],"type":"string"},"disabledReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"previousSecretExpiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","url","description","topics","status","disabledReason","previousSecretExpiresAt","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.webhooks.remove","summary":"Delete a webhook endpoint","description":"It stops receiving events immediately. Its delivery log is kept.","tags":["Admin — Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"const":true}},"required":["id","deleted"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/webhooks/{id}/rotate-secret":{"post":{"operationId":"admin.webhooks.rotateSecret","summary":"Rotate the signing secret","description":"Returns the new secret. For 24 hours deliveries carry signatures from both the old and the new secret, so a receiver can switch over without dropping events.","tags":["Admin — Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"topics":{"type":"array","items":{"enum":["blog.updated","review.updated","message.updated","order.placed","order.confirmed","order.receipt_requested","order.cancelled","order.reported","order.report_withdrawn","fulfillment.created","fulfillment.dispatched","fulfillment.delivered","fulfillment.rto","fulfillment.received","fulfillment.cancelled","fulfillment.lost","return.created","refund.created","inventory.low_stock","inventory.out_of_stock","inventory.back_in_stock","product.created","product.updated","product.deleted","collection.created","collection.updated","collection.deleted","discount.created","discount.updated","discount.deleted","sale.started","sale.ended","customer.created","customer.updated","customer.deleted","checkout.updated","checkout.abandoned","contact.subscribed","page.created","page.updated","page.deleted","menu.updated","redirect.created","redirect.updated","redirect.deleted","store.updated","faq.updated","booking_setup.updated","enquiry.created","booking.booked","booking.rescheduled","booking.cancelled","booking.arrived","booking.completed","booking.no_show","booking.payment_recorded","site.published","payment.succeeded","payment.failed","payment.refunded","order.payment_expired","app.installed","app.uninstalled","app.updated"],"type":"string"}},"status":{"enum":["active","disabled","deleted"],"type":"string"},"disabledReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"previousSecretExpiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"secret":{"type":"string"}},"required":["id","url","description","topics","status","disabledReason","previousSecretExpiresAt","createdAt","updatedAt","secret"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/webhooks/{id}/test":{"post":{"operationId":"admin.webhooks.sendTest","summary":"Send a test event to this endpoint","tags":["Admin — Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"endpointId":{"type":"string"},"eventId":{"type":"string"},"topic":{"enum":["blog.updated","review.updated","message.updated","order.placed","order.confirmed","order.receipt_requested","order.cancelled","order.reported","order.report_withdrawn","fulfillment.created","fulfillment.dispatched","fulfillment.delivered","fulfillment.rto","fulfillment.received","fulfillment.cancelled","fulfillment.lost","return.created","refund.created","inventory.low_stock","inventory.out_of_stock","inventory.back_in_stock","product.created","product.updated","product.deleted","collection.created","collection.updated","collection.deleted","discount.created","discount.updated","discount.deleted","sale.started","sale.ended","customer.created","customer.updated","customer.deleted","checkout.updated","checkout.abandoned","contact.subscribed","page.created","page.updated","page.deleted","menu.updated","redirect.created","redirect.updated","redirect.deleted","store.updated","faq.updated","booking_setup.updated","enquiry.created","booking.booked","booking.rescheduled","booking.cancelled","booking.arrived","booking.completed","booking.no_show","booking.payment_recorded","site.published","payment.succeeded","payment.failed","payment.refunded","order.payment_expired","app.installed","app.uninstalled","app.updated","webhook.test"],"type":"string"},"status":{"enum":["pending","delivering","succeeded","failed"],"type":"string"},"attempts":{"type":"number"},"nextAttemptAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastStatusCode":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"succeededAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","endpointId","eventId","topic","status","attempts","nextAttemptAt","lastStatusCode","lastError","succeededAt","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/webhooks/{id}/deliveries":{"get":{"operationId":"admin.webhooks.listDeliveries","summary":"List an endpoint's deliveries, newest first","tags":["Admin — Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["pending","delivering","succeeded","failed"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"topic","in":"query","schema":{"enum":["blog.updated","review.updated","message.updated","order.placed","order.confirmed","order.receipt_requested","order.cancelled","order.reported","order.report_withdrawn","fulfillment.created","fulfillment.dispatched","fulfillment.delivered","fulfillment.rto","fulfillment.received","fulfillment.cancelled","fulfillment.lost","return.created","refund.created","inventory.low_stock","inventory.out_of_stock","inventory.back_in_stock","product.created","product.updated","product.deleted","collection.created","collection.updated","collection.deleted","discount.created","discount.updated","discount.deleted","sale.started","sale.ended","customer.created","customer.updated","customer.deleted","checkout.updated","checkout.abandoned","contact.subscribed","page.created","page.updated","page.deleted","menu.updated","redirect.created","redirect.updated","redirect.deleted","store.updated","faq.updated","booking_setup.updated","enquiry.created","booking.booked","booking.rescheduled","booking.cancelled","booking.arrived","booking.completed","booking.no_show","booking.payment_recorded","site.published","payment.succeeded","payment.failed","payment.refunded","order.payment_expired","app.installed","app.uninstalled","app.updated","webhook.test"],"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"endpointId":{"type":"string"},"eventId":{"type":"string"},"topic":{"enum":["blog.updated","review.updated","message.updated","order.placed","order.confirmed","order.receipt_requested","order.cancelled","order.reported","order.report_withdrawn","fulfillment.created","fulfillment.dispatched","fulfillment.delivered","fulfillment.rto","fulfillment.received","fulfillment.cancelled","fulfillment.lost","return.created","refund.created","inventory.low_stock","inventory.out_of_stock","inventory.back_in_stock","product.created","product.updated","product.deleted","collection.created","collection.updated","collection.deleted","discount.created","discount.updated","discount.deleted","sale.started","sale.ended","customer.created","customer.updated","customer.deleted","checkout.updated","checkout.abandoned","contact.subscribed","page.created","page.updated","page.deleted","menu.updated","redirect.created","redirect.updated","redirect.deleted","store.updated","faq.updated","booking_setup.updated","enquiry.created","booking.booked","booking.rescheduled","booking.cancelled","booking.arrived","booking.completed","booking.no_show","booking.payment_recorded","site.published","payment.succeeded","payment.failed","payment.refunded","order.payment_expired","app.installed","app.uninstalled","app.updated","webhook.test"],"type":"string"},"status":{"enum":["pending","delivering","succeeded","failed"],"type":"string"},"attempts":{"type":"number"},"nextAttemptAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastStatusCode":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"succeededAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","endpointId","eventId","topic","status","attempts","nextAttemptAt","lastStatusCode","lastError","succeededAt","createdAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/webhook-deliveries/{id}":{"get":{"operationId":"admin.webhooks.getDelivery","summary":"Get a delivery with its payload and attempt log","tags":["Admin — Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"endpointId":{"type":"string"},"eventId":{"type":"string"},"topic":{"enum":["blog.updated","review.updated","message.updated","order.placed","order.confirmed","order.receipt_requested","order.cancelled","order.reported","order.report_withdrawn","fulfillment.created","fulfillment.dispatched","fulfillment.delivered","fulfillment.rto","fulfillment.received","fulfillment.cancelled","fulfillment.lost","return.created","refund.created","inventory.low_stock","inventory.out_of_stock","inventory.back_in_stock","product.created","product.updated","product.deleted","collection.created","collection.updated","collection.deleted","discount.created","discount.updated","discount.deleted","sale.started","sale.ended","customer.created","customer.updated","customer.deleted","checkout.updated","checkout.abandoned","contact.subscribed","page.created","page.updated","page.deleted","menu.updated","redirect.created","redirect.updated","redirect.deleted","store.updated","faq.updated","booking_setup.updated","enquiry.created","booking.booked","booking.rescheduled","booking.cancelled","booking.arrived","booking.completed","booking.no_show","booking.payment_recorded","site.published","payment.succeeded","payment.failed","payment.refunded","order.payment_expired","app.installed","app.uninstalled","app.updated","webhook.test"],"type":"string"},"status":{"enum":["pending","delivering","succeeded","failed"],"type":"string"},"attempts":{"type":"number"},"nextAttemptAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastStatusCode":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"succeededAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"payload":{},"attemptLog":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"statusCode":{"anyOf":[{"type":"number"},{"type":"null"}]},"durationMs":{"type":"number"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"responseSnippet":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","statusCode","durationMs","error","responseSnippet","createdAt"]}}},"required":["id","endpointId","eventId","topic","status","attempts","nextAttemptAt","lastStatusCode","lastError","succeededAt","createdAt","attemptLog"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/webhook-deliveries/{id}/redeliver":{"post":{"operationId":"admin.webhooks.redeliver","summary":"Send a delivery again","description":"Queues the same event, with the same id, for another attempt. Previous attempts stay in the log.","tags":["Admin — Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"endpointId":{"type":"string"},"eventId":{"type":"string"},"topic":{"enum":["blog.updated","review.updated","message.updated","order.placed","order.confirmed","order.receipt_requested","order.cancelled","order.reported","order.report_withdrawn","fulfillment.created","fulfillment.dispatched","fulfillment.delivered","fulfillment.rto","fulfillment.received","fulfillment.cancelled","fulfillment.lost","return.created","refund.created","inventory.low_stock","inventory.out_of_stock","inventory.back_in_stock","product.created","product.updated","product.deleted","collection.created","collection.updated","collection.deleted","discount.created","discount.updated","discount.deleted","sale.started","sale.ended","customer.created","customer.updated","customer.deleted","checkout.updated","checkout.abandoned","contact.subscribed","page.created","page.updated","page.deleted","menu.updated","redirect.created","redirect.updated","redirect.deleted","store.updated","faq.updated","booking_setup.updated","enquiry.created","booking.booked","booking.rescheduled","booking.cancelled","booking.arrived","booking.completed","booking.no_show","booking.payment_recorded","site.published","payment.succeeded","payment.failed","payment.refunded","order.payment_expired","app.installed","app.uninstalled","app.updated","webhook.test"],"type":"string"},"status":{"enum":["pending","delivering","succeeded","failed"],"type":"string"},"attempts":{"type":"number"},"nextAttemptAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastStatusCode":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"succeededAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","endpointId","eventId","topic","status","attempts","nextAttemptAt","lastStatusCode","lastError","succeededAt","createdAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/shipping/zones":{"get":{"operationId":"admin.shipping.listZones","summary":"List shipping zones","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"locations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"matchType":{"enum":["country","region","city"],"type":"string"},"mode":{"enum":["include","exclude"],"type":"string"},"countryCode":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"regionCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"cityName":{"anyOf":[{"type":"string"},{"type":"null"}]},"cityNormalized":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","matchType","mode","countryCode","regionCode","cityName","cityNormalized"]}},"priority":{"type":"number"},"chargeTax":{"type":"boolean"},"customsNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","locations","priority","chargeTax","customsNote","createdAt","updatedAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"post":{"operationId":"admin.shipping.createZone","summary":"Create a shipping zone","description":"Defines a delivery zone with country, region, or city include/exclude rules. Overlapping zones are allowed and resolved by specificity (city > region > country) and priority.","tags":["Admin — Fulfillments & Shipping"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"locations":{"type":"array","items":{"type":"object","properties":{"matchType":{"enum":["country","region","city"],"type":"string"},"mode":{"enum":["include","exclude"],"type":"string","default":"include"},"countryCode":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"regionCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"cityName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["matchType","countryCode"]}},"priority":{"type":"number","default":0},"chargeTax":{"type":"boolean","default":true},"customsNote":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","locations"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"locations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"matchType":{"enum":["country","region","city"],"type":"string"},"mode":{"enum":["include","exclude"],"type":"string"},"countryCode":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"regionCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"cityName":{"anyOf":[{"type":"string"},{"type":"null"}]},"cityNormalized":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","matchType","mode","countryCode","regionCode","cityName","cityNormalized"]}},"priority":{"type":"number"},"chargeTax":{"type":"boolean"},"customsNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","locations","priority","chargeTax","customsNote","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/shipping/zones/{id}":{"patch":{"operationId":"admin.shipping.updateZone","summary":"Update a shipping zone","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"locations":{"type":"array","items":{"type":"object","properties":{"matchType":{"enum":["country","region","city"],"type":"string"},"mode":{"enum":["include","exclude"],"type":"string","default":"include"},"countryCode":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"regionCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"cityName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["matchType","countryCode"]}},"priority":{"type":"number"},"chargeTax":{"type":"boolean"},"customsNote":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"locations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"matchType":{"enum":["country","region","city"],"type":"string"},"mode":{"enum":["include","exclude"],"type":"string"},"countryCode":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"regionCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"cityName":{"anyOf":[{"type":"string"},{"type":"null"}]},"cityNormalized":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","matchType","mode","countryCode","regionCode","cityName","cityNormalized"]}},"priority":{"type":"number"},"chargeTax":{"type":"boolean"},"customsNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","locations","priority","chargeTax","customsNote","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.shipping.removeZone","summary":"Delete a shipping zone","description":"Retires the zone and its rates; nothing is removed.","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"const":true}},"required":["id","deleted"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/shipping/rates":{"get":{"operationId":"admin.shipping.listRates","summary":"List shipping rates","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"zoneId","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"zoneId":{"type":"string"},"name":{"type":"string"},"pricePaisa":{"type":"number"},"freeOverPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"minDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"minWeightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxWeightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","zoneId","name","pricePaisa","freeOverPaisa","minDays","maxDays","minWeightGrams","maxWeightGrams","position","createdAt","updatedAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"post":{"operationId":"admin.shipping.createRate","summary":"Create a shipping rate","tags":["Admin — Fulfillments & Shipping"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"pricePaisa":{"type":"number"},"freeOverPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"minDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"minWeightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxWeightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number","default":0},"zoneId":{"type":"string"}},"required":["name","pricePaisa","zoneId"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"zoneId":{"type":"string"},"name":{"type":"string"},"pricePaisa":{"type":"number"},"freeOverPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"minDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"minWeightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxWeightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","zoneId","name","pricePaisa","freeOverPaisa","minDays","maxDays","minWeightGrams","maxWeightGrams","position","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/shipping/rates/{id}":{"patch":{"operationId":"admin.shipping.updateRate","summary":"Update a shipping rate","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"pricePaisa":{"type":"number"},"freeOverPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"minDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"minWeightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxWeightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"zoneId":{"type":"string"},"name":{"type":"string"},"pricePaisa":{"type":"number"},"freeOverPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"minDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"minWeightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxWeightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","zoneId","name","pricePaisa","freeOverPaisa","minDays","maxDays","minWeightGrams","maxWeightGrams","position","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.shipping.removeRate","summary":"Delete a shipping rate","tags":["Admin — Fulfillments & Shipping"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"const":true}},"required":["id","deleted"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/discounts":{"post":{"operationId":"admin.discounts.create","summary":"Create a discount","tags":["Admin — Customers & Discounts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"method":{"enum":["code","automatic","sale"],"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"percentageBps":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null},"amountPaisa":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null},"fixedApplies":{"anyOf":[{"enum":["once_per_order","each_item"],"type":"string"},{"type":"null"}],"default":null},"maxDiscountPaisa":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null},"appliesTo":{"enum":["all","products","collections"],"type":"string","default":"all"},"productIds":{"type":"array","items":{"type":"string"},"default":[]},"collectionIds":{"type":"array","items":{"type":"string"},"default":[]},"minRequirement":{"enum":["none","subtotal","quantity"],"type":"string","default":"none"},"minSubtotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null},"minQuantity":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null},"customerEligibility":{"enum":["all","specific"],"type":"string","default":"all"},"customerIds":{"type":"array","items":{"type":"string"},"default":[]},"shippingZoneIds":{"type":"array","items":{"type":"string"},"default":[]},"maxShippingRatePaisa":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null},"usageLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null},"oncePerCustomer":{"type":"boolean","default":false},"combinesWith":{"type":"object","properties":{"product":{"type":"boolean"},"order":{"type":"boolean"},"shipping":{"type":"boolean"}},"required":["product","order","shipping"],"default":{"product":false,"order":false,"shipping":false}},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}],"default":null},"excludedProductIds":{"type":"array","items":{"type":"string"},"default":[]},"excludedCollectionIds":{"type":"array","items":{"type":"string"},"default":[]},"includeMarkedDown":{"type":"boolean","default":false},"status":{"enum":["active","disabled"],"type":"string","default":"active"}},"required":["title","method","type","valueType"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"method":{"enum":["code","automatic","sale"],"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"percentageBps":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"fixedApplies":{"anyOf":[{"enum":["once_per_order","each_item"],"type":"string"},{"type":"null"}]},"maxDiscountPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"appliesTo":{"enum":["all","products","collections"],"type":"string"},"productIds":{"type":"array","items":{"type":"string"}},"collectionIds":{"type":"array","items":{"type":"string"}},"minRequirement":{"enum":["none","subtotal","quantity"],"type":"string"},"minSubtotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"minQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"customerEligibility":{"enum":["all","specific"],"type":"string"},"customerIds":{"type":"array","items":{"type":"string"}},"shippingZoneIds":{"type":"array","items":{"type":"string"}},"maxShippingRatePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"usageLimit":{"anyOf":[{"type":"number"},{"type":"null"}]},"oncePerCustomer":{"type":"boolean"},"combinesWith":{"type":"object","properties":{"product":{"type":"boolean"},"order":{"type":"boolean"},"shipping":{"type":"boolean"}},"required":["product","order","shipping"]},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"excludedProductIds":{"type":"array","items":{"type":"string"}},"excludedCollectionIds":{"type":"array","items":{"type":"string"}},"includeMarkedDown":{"type":"boolean"},"status":{"enum":["active","disabled","deleted"],"type":"string"},"state":{"enum":["active","scheduled","expired","disabled"],"type":"string"},"usageCount":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","title","method","code","type","valueType","percentageBps","amountPaisa","fixedApplies","maxDiscountPaisa","appliesTo","productIds","collectionIds","minRequirement","minSubtotalPaisa","minQuantity","customerEligibility","customerIds","shippingZoneIds","maxShippingRatePaisa","usageLimit","oncePerCustomer","combinesWith","startsAt","endsAt","excludedProductIds","excludedCollectionIds","includeMarkedDown","status","state","usageCount","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"get":{"operationId":"admin.discounts.list","summary":"List discounts, newest first","tags":["Admin — Customers & Discounts"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"state","in":"query","schema":{"enum":["active","scheduled","expired","disabled"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"method","in":"query","schema":{"enum":["code","automatic","sale"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"type","in":"query","schema":{"enum":["product","order","shipping"],"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"method":{"enum":["code","automatic","sale"],"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"percentageBps":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"fixedApplies":{"anyOf":[{"enum":["once_per_order","each_item"],"type":"string"},{"type":"null"}]},"maxDiscountPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"appliesTo":{"enum":["all","products","collections"],"type":"string"},"productIds":{"type":"array","items":{"type":"string"}},"collectionIds":{"type":"array","items":{"type":"string"}},"minRequirement":{"enum":["none","subtotal","quantity"],"type":"string"},"minSubtotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"minQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"customerEligibility":{"enum":["all","specific"],"type":"string"},"customerIds":{"type":"array","items":{"type":"string"}},"shippingZoneIds":{"type":"array","items":{"type":"string"}},"maxShippingRatePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"usageLimit":{"anyOf":[{"type":"number"},{"type":"null"}]},"oncePerCustomer":{"type":"boolean"},"combinesWith":{"type":"object","properties":{"product":{"type":"boolean"},"order":{"type":"boolean"},"shipping":{"type":"boolean"}},"required":["product","order","shipping"]},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"excludedProductIds":{"type":"array","items":{"type":"string"}},"excludedCollectionIds":{"type":"array","items":{"type":"string"}},"includeMarkedDown":{"type":"boolean"},"status":{"enum":["active","disabled","deleted"],"type":"string"},"state":{"enum":["active","scheduled","expired","disabled"],"type":"string"},"usageCount":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","title","method","code","type","valueType","percentageBps","amountPaisa","fixedApplies","maxDiscountPaisa","appliesTo","productIds","collectionIds","minRequirement","minSubtotalPaisa","minQuantity","customerEligibility","customerIds","shippingZoneIds","maxShippingRatePaisa","usageLimit","oncePerCustomer","combinesWith","startsAt","endsAt","excludedProductIds","excludedCollectionIds","includeMarkedDown","status","state","usageCount","createdAt","updatedAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/discounts/counts":{"get":{"operationId":"admin.discounts.counts","summary":"Count discounts by state","description":"Exact counts for the discount list's views: every discount that is not deleted, and how many are active, scheduled, expired or disabled right now.","tags":["Admin — Customers & Discounts"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"all":{"type":"number"},"active":{"type":"number"},"scheduled":{"type":"number"},"expired":{"type":"number"},"disabled":{"type":"number"}},"required":["all","active","scheduled","expired","disabled"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/discounts/{id}":{"get":{"operationId":"admin.discounts.get","summary":"Get a discount","tags":["Admin — Customers & Discounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"method":{"enum":["code","automatic","sale"],"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"percentageBps":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"fixedApplies":{"anyOf":[{"enum":["once_per_order","each_item"],"type":"string"},{"type":"null"}]},"maxDiscountPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"appliesTo":{"enum":["all","products","collections"],"type":"string"},"productIds":{"type":"array","items":{"type":"string"}},"collectionIds":{"type":"array","items":{"type":"string"}},"minRequirement":{"enum":["none","subtotal","quantity"],"type":"string"},"minSubtotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"minQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"customerEligibility":{"enum":["all","specific"],"type":"string"},"customerIds":{"type":"array","items":{"type":"string"}},"shippingZoneIds":{"type":"array","items":{"type":"string"}},"maxShippingRatePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"usageLimit":{"anyOf":[{"type":"number"},{"type":"null"}]},"oncePerCustomer":{"type":"boolean"},"combinesWith":{"type":"object","properties":{"product":{"type":"boolean"},"order":{"type":"boolean"},"shipping":{"type":"boolean"}},"required":["product","order","shipping"]},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"excludedProductIds":{"type":"array","items":{"type":"string"}},"excludedCollectionIds":{"type":"array","items":{"type":"string"}},"includeMarkedDown":{"type":"boolean"},"status":{"enum":["active","disabled","deleted"],"type":"string"},"state":{"enum":["active","scheduled","expired","disabled"],"type":"string"},"usageCount":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","title","method","code","type","valueType","percentageBps","amountPaisa","fixedApplies","maxDiscountPaisa","appliesTo","productIds","collectionIds","minRequirement","minSubtotalPaisa","minQuantity","customerEligibility","customerIds","shippingZoneIds","maxShippingRatePaisa","usageLimit","oncePerCustomer","combinesWith","startsAt","endsAt","excludedProductIds","excludedCollectionIds","includeMarkedDown","status","state","usageCount","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"patch":{"operationId":"admin.discounts.update","summary":"Update a discount","description":"Any subset of settings; the merged result must still be a coherent discount. Product, collection and customer lists are replaced when given.","tags":["Admin — Customers & Discounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"method":{"enum":["code","automatic","sale"],"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"percentageBps":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"fixedApplies":{"anyOf":[{"enum":["once_per_order","each_item"],"type":"string"},{"type":"null"}]},"maxDiscountPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"appliesTo":{"enum":["all","products","collections"],"type":"string"},"productIds":{"type":"array","items":{"type":"string"}},"collectionIds":{"type":"array","items":{"type":"string"}},"minRequirement":{"enum":["none","subtotal","quantity"],"type":"string"},"minSubtotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"minQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"customerEligibility":{"enum":["all","specific"],"type":"string"},"customerIds":{"type":"array","items":{"type":"string"}},"shippingZoneIds":{"type":"array","items":{"type":"string"}},"maxShippingRatePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"usageLimit":{"anyOf":[{"type":"number"},{"type":"null"}]},"oncePerCustomer":{"type":"boolean"},"combinesWith":{"type":"object","properties":{"product":{"type":"boolean"},"order":{"type":"boolean"},"shipping":{"type":"boolean"}},"required":["product","order","shipping"]},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"excludedProductIds":{"type":"array","items":{"type":"string"}},"excludedCollectionIds":{"type":"array","items":{"type":"string"}},"includeMarkedDown":{"type":"boolean"},"status":{"enum":["active","disabled"],"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"method":{"enum":["code","automatic","sale"],"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"enum":["product","order","shipping"],"type":"string"},"valueType":{"enum":["percentage","fixed_amount","free"],"type":"string"},"percentageBps":{"anyOf":[{"type":"number"},{"type":"null"}]},"amountPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"fixedApplies":{"anyOf":[{"enum":["once_per_order","each_item"],"type":"string"},{"type":"null"}]},"maxDiscountPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"appliesTo":{"enum":["all","products","collections"],"type":"string"},"productIds":{"type":"array","items":{"type":"string"}},"collectionIds":{"type":"array","items":{"type":"string"}},"minRequirement":{"enum":["none","subtotal","quantity"],"type":"string"},"minSubtotalPaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"minQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"customerEligibility":{"enum":["all","specific"],"type":"string"},"customerIds":{"type":"array","items":{"type":"string"}},"shippingZoneIds":{"type":"array","items":{"type":"string"}},"maxShippingRatePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"usageLimit":{"anyOf":[{"type":"number"},{"type":"null"}]},"oncePerCustomer":{"type":"boolean"},"combinesWith":{"type":"object","properties":{"product":{"type":"boolean"},"order":{"type":"boolean"},"shipping":{"type":"boolean"}},"required":["product","order","shipping"]},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"excludedProductIds":{"type":"array","items":{"type":"string"}},"excludedCollectionIds":{"type":"array","items":{"type":"string"}},"includeMarkedDown":{"type":"boolean"},"status":{"enum":["active","disabled","deleted"],"type":"string"},"state":{"enum":["active","scheduled","expired","disabled"],"type":"string"},"usageCount":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","title","method","code","type","valueType","percentageBps","amountPaisa","fixedApplies","maxDiscountPaisa","appliesTo","productIds","collectionIds","minRequirement","minSubtotalPaisa","minQuantity","customerEligibility","customerIds","shippingZoneIds","maxShippingRatePaisa","usageLimit","oncePerCustomer","combinesWith","startsAt","endsAt","excludedProductIds","excludedCollectionIds","includeMarkedDown","status","state","usageCount","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.discounts.remove","summary":"Delete a discount","description":"Soft: orders that used it keep their record of what it took off.","tags":["Admin — Customers & Discounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"const":true}},"required":["id","deleted"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/discounts/{id}/usages":{"get":{"operationId":"admin.discounts.listUsages","summary":"Orders that used a discount, newest first","tags":["Admin — Customers & Discounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"orderId":{"type":"string"},"orderNumber":{"type":"number"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["active","released"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["orderId","orderNumber","customerId","phone","status","createdAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/discounts/sale-preview":{"post":{"operationId":"admin.discounts.previewSale","summary":"Preview a sale","description":"What a sale with these settings would price now: products and variants, sample prices, variants it skips and why, overlapping sales and discounts that will not reduce sale items. Nothing is saved.","tags":["Admin — Customers & Discounts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"percentageBps":{"type":"number"},"appliesTo":{"enum":["all","products","collections"],"type":"string"},"productIds":{"type":"array","items":{"type":"string"},"default":[]},"collectionIds":{"type":"array","items":{"type":"string"},"default":[]},"excludedProductIds":{"type":"array","items":{"type":"string"},"default":[]},"excludedCollectionIds":{"type":"array","items":{"type":"string"},"default":[]},"includeMarkedDown":{"type":"boolean","default":false},"combinesWith":{"type":"object","properties":{"product":{"type":"boolean"},"order":{"type":"boolean"},"shipping":{"type":"boolean"}},"required":["product","order","shipping"],"default":{"product":false,"order":false,"shipping":true}},"startsAt":{"type":"string","format":"date-time","x-native-type":"date"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}],"default":null}},"required":["percentageBps","appliesTo"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"number"},"variants":{"type":"number"},"skippedMarkedDown":{"type":"number"},"skippedExcluded":{"type":"number"},"skippedOtherSale":{"type":"number"},"samples":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"productTitle":{"type":"string"},"variantTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"pricePaisa":{"type":"number"},"salePricePaisa":{"type":"number"},"compareAtPricePaisa":{"type":"number"}},"required":["productId","productTitle","variantTitle","pricePaisa","salePricePaisa","compareAtPricePaisa"]}},"overlaps":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"state":{"enum":["active","scheduled","expired","disabled"],"type":"string"},"wins":{"type":"number"},"loses":{"type":"number"}},"required":["discountId","title","percentageBps","state","wins","loses"]}},"conflicts":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"enum":["product","order","shipping"],"type":"string"},"effect":{"enum":["items","cart"],"type":"string"}},"required":["discountId","title","code","type","effect"]}}},"required":["products","variants","skippedMarkedDown","skippedExcluded","skippedOtherSale","samples","overlaps","conflicts"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/discounts/{id}/stats":{"get":{"operationId":"admin.discounts.stats","summary":"Sales made with a discount","description":"How many orders used the discount, those orders' totals and what the discount took off them. Cancelled and test orders are left out.","tags":["Admin — Customers & Discounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"orders":{"type":"number"},"sales":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"enum":["PKR"],"type":"string"}},"required":["amount","currency"]},"discountGiven":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"enum":["PKR"],"type":"string"}},"required":["amount","currency"]}},"required":["orders","sales","discountGiven"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/templates":{"get":{"operationId":"admin.templates.list","summary":"List store templates","description":"Gallery metadata only: no page bodies or sections.","tags":["Admin — Online Store & Site"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"enum":["rangrez","sada-threads","kilobyte","volt-wire","neem-dew","aangan","sajawat-studio","khel-ghar","taza-basket","zewar","stride","karahi-house"],"type":"string"},"version":{"type":"number"},"name":{"type":"string"},"vertical":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"previews":{"type":"object","properties":{"desktop":{"type":"string"},"mobile":{"type":"string"}},"required":["desktop","mobile"]},"theme":{"type":"object","properties":{"preset":{"enum":["counter","bazaar","truck-art"],"type":"string"},"accent":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"anyOf":[{"enum":["sm","md","lg"],"type":"string"},{"type":"null"}]},"appearance":{"enum":["system","light","dark"],"type":"string"},"fontPairing":{"enum":["figtree","editorial","modern","classic","urban"],"type":"string"},"productCard":{"enum":["standard","minimal","overlay"],"type":"string"},"density":{"enum":["comfortable","compact"],"type":"string"},"headingScale":{"enum":["s","m","l"],"type":"string"},"headingCase":{"enum":["normal","uppercase"],"type":"string"},"buttonShape":{"enum":["square","rounded","pill"],"type":"string"},"buttonStyle":{"enum":["solid","outline"],"type":"string"},"cardImageRatio":{"enum":["portrait","square","landscape"],"type":"string"}},"required":["preset","accent","radius","appearance","fontPairing","productCard","density","headingScale","headingCase","buttonShape","buttonStyle","cardImageRatio"]},"swatch":{"type":"array","items":{"type":"string"}}},"required":["id","version","name","vertical","description","tags","previews","theme","swatch"]}}},"required":["data"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/redirects":{"post":{"operationId":"admin.redirects.create","summary":"Create a redirect","tags":["Admin — Content & Reviews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fromPath":{"type":"string"},"toPath":{"type":"string"},"statusCode":{"anyOf":[{"const":301},{"const":302}],"default":301}},"required":["fromPath","toPath"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"fromPath":{"type":"string"},"toPath":{"type":"string"},"statusCode":{"anyOf":[{"const":301},{"const":302}]},"automatic":{"type":"boolean"},"status":{"enum":["active","deleted"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","fromPath","toPath","statusCode","automatic","status","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"get":{"operationId":"admin.redirects.list","summary":"List redirects","tags":["Admin — Content & Reviews"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fromPath":{"type":"string"},"toPath":{"type":"string"},"statusCode":{"anyOf":[{"const":301},{"const":302}]},"automatic":{"type":"boolean"},"status":{"enum":["active","deleted"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","fromPath","toPath","statusCode","automatic","status","createdAt","updatedAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/redirects/{id}":{"patch":{"operationId":"admin.redirects.update","summary":"Update a redirect","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"fromPath":{"type":"string"},"toPath":{"type":"string"},"statusCode":{"anyOf":[{"const":301},{"const":302}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"fromPath":{"type":"string"},"toPath":{"type":"string"},"statusCode":{"anyOf":[{"const":301},{"const":302}]},"automatic":{"type":"boolean"},"status":{"enum":["active","deleted"],"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","fromPath","toPath","statusCode","automatic","status","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.redirects.remove","summary":"Delete a redirect","tags":["Admin — Content & Reviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"const":true}},"required":["id","deleted"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/redirects/import":{"post":{"operationId":"admin.redirects.import","summary":"Import redirects","description":"Up to 5,000 rows. Only adds: existing manual redirects are never replaced, and automatic ones only with `replaceAutomatic`. `dryRun` reports per-row outcomes without writing.","tags":["Admin — Content & Reviews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"fromPath":{"type":"string"},"toPath":{"type":"string"},"statusCode":{"anyOf":[{"const":301},{"const":302}]}},"required":["fromPath","toPath"]}},"dryRun":{"type":"boolean"},"replaceAutomatic":{"type":"boolean","default":false}},"required":["rows","dryRun"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"fromPath":{"type":"string"},"toPath":{"type":"string"},"statusCode":{"anyOf":[{"const":301},{"const":302}]},"outcome":{"enum":["create","duplicate","conflict_automatic","loop","chain_flattened","invalid"],"type":"string"},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["index","fromPath","toPath","statusCode","outcome","message"]}},"created":{"type":"number"},"skipped":{"type":"number"}},"required":["rows","created","skipped"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/collections":{"post":{"operationId":"admin.collections.create","summary":"Create a collection","tags":["Admin — Catalog"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string","default":"draft"},"mode":{"enum":["manual","automated"],"type":"string","default":"manual"},"rules":{"anyOf":[{"type":"object","properties":{"match":{"enum":["all","any"],"type":"string"},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"enum":["title","product_type","vendor","tag","price","compare_at_price","inventory"],"type":"string"},"operator":{"enum":["equals","not_equals","contains","not_contains","starts_with","ends_with","greater_than","less_than","is_set","is_not_set"],"type":"string"},"value":{"type":"string","default":""}},"required":["field","operator"]}}},"required":["match","conditions"]},{"type":"null"}]},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["slug","title"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"mode":{"enum":["manual","automated"],"type":"string"},"rules":{"anyOf":[{"type":"object","properties":{"match":{"enum":["all","any"],"type":"string"},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"enum":["title","product_type","vendor","tag","price","compare_at_price","inventory"],"type":"string"},"operator":{"enum":["equals","not_equals","contains","not_contains","starts_with","ends_with","greater_than","less_than","is_set","is_not_set"],"type":"string"},"value":{"type":"string","default":""}},"required":["field","operator"]}}},"required":["match","conditions"]},{"type":"null"}]},"productCount":{"type":"number"},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","mode","rules","productCount","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"get":{"operationId":"admin.collections.list","summary":"List collections","tags":["Admin — Catalog"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"mode":{"enum":["manual","automated"],"type":"string"},"rules":{"anyOf":[{"type":"object","properties":{"match":{"enum":["all","any"],"type":"string"},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"enum":["title","product_type","vendor","tag","price","compare_at_price","inventory"],"type":"string"},"operator":{"enum":["equals","not_equals","contains","not_contains","starts_with","ends_with","greater_than","less_than","is_set","is_not_set"],"type":"string"},"value":{"type":"string","default":""}},"required":["field","operator"]}}},"required":["match","conditions"]},{"type":"null"}]},"productCount":{"type":"number"},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","mode","rules","productCount","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/collections/{id}":{"get":{"operationId":"admin.collections.get","summary":"Get a collection","tags":["Admin — Catalog"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"mode":{"enum":["manual","automated"],"type":"string"},"rules":{"anyOf":[{"type":"object","properties":{"match":{"enum":["all","any"],"type":"string"},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"enum":["title","product_type","vendor","tag","price","compare_at_price","inventory"],"type":"string"},"operator":{"enum":["equals","not_equals","contains","not_contains","starts_with","ends_with","greater_than","less_than","is_set","is_not_set"],"type":"string"},"value":{"type":"string","default":""}},"required":["field","operator"]}}},"required":["match","conditions"]},{"type":"null"}]},"productCount":{"type":"number"},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","mode","rules","productCount","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"patch":{"operationId":"admin.collections.update","summary":"Update a collection","tags":["Admin — Catalog"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"mode":{"enum":["manual","automated"],"type":"string"},"rules":{"anyOf":[{"type":"object","properties":{"match":{"enum":["all","any"],"type":"string"},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"enum":["title","product_type","vendor","tag","price","compare_at_price","inventory"],"type":"string"},"operator":{"enum":["equals","not_equals","contains","not_contains","starts_with","ends_with","greater_than","less_than","is_set","is_not_set"],"type":"string"},"value":{"type":"string","default":""}},"required":["field","operator"]}}},"required":["match","conditions"]},{"type":"null"}]},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"mode":{"enum":["manual","automated"],"type":"string"},"rules":{"anyOf":[{"type":"object","properties":{"match":{"enum":["all","any"],"type":"string"},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"enum":["title","product_type","vendor","tag","price","compare_at_price","inventory"],"type":"string"},"operator":{"enum":["equals","not_equals","contains","not_contains","starts_with","ends_with","greater_than","less_than","is_set","is_not_set"],"type":"string"},"value":{"type":"string","default":""}},"required":["field","operator"]}}},"required":["match","conditions"]},{"type":"null"}]},"productCount":{"type":"number"},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","mode","rules","productCount","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"delete":{"operationId":"admin.collections.remove","summary":"Delete a collection","tags":["Admin — Catalog"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"const":true}},"required":["id","deleted"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/collections/{id}/products":{"get":{"operationId":"admin.collections.listProducts","summary":"List a collection's products","tags":["Admin — Catalog"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"number","default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]},"put":{"operationId":"admin.collections.setProducts","summary":"Set the collection's ordered membership","tags":["Admin — Catalog"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}}},"required":["productIds"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"mode":{"enum":["manual","automated"],"type":"string"},"rules":{"anyOf":[{"type":"object","properties":{"match":{"enum":["all","any"],"type":"string"},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"enum":["title","product_type","vendor","tag","price","compare_at_price","inventory"],"type":"string"},"operator":{"enum":["equals","not_equals","contains","not_contains","starts_with","ends_with","greater_than","less_than","is_set","is_not_set"],"type":"string"},"value":{"type":"string","default":""}},"required":["field","operator"]}}},"required":["match","conditions"]},{"type":"null"}]},"productCount":{"type":"number"},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","mode","rules","productCount","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}},"/admin/v1/collections/rules/preview":{"post":{"operationId":"admin.collections.previewRules","summary":"Preview an automated collection's conditions","description":"Counts the products unsaved conditions match and returns the first of them, newest first. Draft and archived products are counted; the storefront shows only active ones.","tags":["Admin — Catalog"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"object","properties":{"match":{"enum":["all","any"],"type":"string"},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"enum":["title","product_type","vendor","tag","price","compare_at_price","inventory"],"type":"string"},"operator":{"enum":["equals","not_equals","contains","not_contains","starts_with","ends_with","greater_than","less_than","is_set","is_not_set"],"type":"string"},"value":{"type":"string","default":""}},"required":["field","operator"]}}},"required":["match","conditions"]},"limit":{"type":"number","default":10}},"required":["rules"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","active","archived","deleted"],"type":"string"},"kind":{"enum":["physical","appointment","session","package"],"type":"string"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}]},"productType":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"customBadge":{"anyOf":[{"type":"string"},{"type":"null"}]},"badges":{"type":"array","items":{"type":"string"}},"rating":{"anyOf":[{"type":"object","properties":{"average":{"type":"number"},"count":{"type":"number"}},"required":["average","count"]},{"type":"null"}]},"relatedProductIds":{"type":"array","items":{"type":"string"}},"tabs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"pageId":{"type":"string"},"sizeGuide":{"type":"boolean"}},"required":["title","pageId"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"taxClassId":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"number"}},"required":["id","value","position"]}}},"required":["id","name","position","values"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePaisa":{"type":"number"},"compareAtPricePaisa":{"anyOf":[{"type":"number"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"type":"number"},"optionValues":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionName":{"type":"string"},"valueId":{"type":"string"},"value":{"type":"string"}},"required":["optionId","optionName","valueId","value"]}},"imageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackInventory":{"type":"boolean"},"allowOversell":{"type":"boolean"},"sellable":{"type":"boolean"},"availability":{"anyOf":[{"enum":["in_stock","low_stock","out_of_stock"],"type":"string"},{"type":"null"}]},"sale":{"anyOf":[{"type":"object","properties":{"discountId":{"type":"string"},"title":{"type":"string"},"percentageBps":{"type":"number"},"basePricePaisa":{"type":"number"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["discountId","title","percentageBps","basePricePaisa","endsAt"]},{"type":"null"}]}},"required":["id","pricePaisa","compareAtPricePaisa","sku","barcode","weightGrams","position","optionValues","imageId","trackInventory","allowOversell","sellable","availability"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]}},"seoTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoImageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","ready","deleted"],"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"byteSize":{"type":"number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","url","contentType","byteSize","width","height","alt","createdAt"]},{"type":"null"}]}},"required":["title","description","image"]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","slug","title","description","status","kind","vendor","productType","tags","publishedAt","options","variants","images","seoTitle","seoDescription","seoImageId","seo","createdAt","updatedAt"]}}},"required":["count","items"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Missing or invalid credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Those credentials cannot perform this action."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"No such resource."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"That conflicts with something that already exists."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"owedPaisa":{"type":"number"},"current":{},"code":{"type":"string"},"version":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id","message"]}},"variantIds":{"type":"array","items":{"type":"string"}},"left":{"type":"number"}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"The request was well-formed but could not be processed."},"data":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Rate limit exceeded."},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"reason":{"type":"string"},"feature":{"type":"string"},"resetsAt":{"type":"string"},"plans":{"type":"array","items":{"type":"string"}}}}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[{"secretKey":[]}]}}},"components":{"securitySchemes":{"publishableKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer."},"secretKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer."}}}}