{"openapi":"3.1.0","info":{"title":"Stores. Admin API","version":"v1","description":"Read and write a store’s data from an installed app. Authenticate with the installation’s access token: `Authorization: Bearer sza_…`. Every response carries `X-Request-Id` and `X-RateLimit-*` headers."},"servers":[{"url":"https://api.storesdot.com/v1"}],"security":[{"accessToken":[]}],"components":{"securitySchemes":{"accessToken":{"type":"http","scheme":"bearer","description":"Installation access token (`sza_…`), shown once when the app is installed."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","NOT_FOUND","VALIDATION","CONFLICT","PLAN_LIMIT","RATE_LIMITED","STORE_UNAVAILABLE","INTERNAL"]},"message":{"type":"string"},"request_id":{"type":"string"},"missing_scopes":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"Shop":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"handle":{"type":"string"},"primary_domain":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"currency":{"type":"string","minLength":3,"maxLength":3},"timezone":{"type":"string"},"country":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"city":{"type":["string","null"]},"status":{"type":"string","enum":["setup","live","suspended","closed"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","handle","primary_domain","email","phone","currency","timezone","country","city","status","created_at"],"additionalProperties":false},"Product":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"handle":{"type":"string"},"description_html":{"type":["string","null"]},"status":{"type":"string","enum":["draft","active","archived"]},"product_type":{"type":["string","null"]},"vendor":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"published_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"variants":{"type":"array","items":{"$ref":"#/components/schemas/Variant"}},"images":{"type":"array","items":{"$ref":"#/components/schemas/ProductImage"}}},"required":["id","title","handle","description_html","status","product_type","vendor","tags","published_at","created_at","updated_at","variants","images"],"additionalProperties":false},"Variant":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"product_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"option1":{"type":["string","null"]},"option2":{"type":["string","null"]},"option3":{"type":["string","null"]},"sku":{"type":["string","null"]},"barcode":{"type":["string","null"]},"price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"compare_at_price":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},{"type":"null"}]},"weight_grams":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"requires_shipping":{"type":"boolean"},"taxable":{"type":"boolean"},"track_inventory":{"type":"boolean"},"inventory_policy":{"type":"string","enum":["deny","continue"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","product_id","title","option1","option2","option3","sku","barcode","price","compare_at_price","weight_grams","requires_shipping","taxable","track_inventory","inventory_policy","position","created_at","updated_at"],"additionalProperties":false},"ProductImage":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The media id."},"src":{"type":"string","format":"uri"},"alt":{"type":["string","null"]},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","src","alt","width","height","position"],"additionalProperties":false},"ProductCreate":{"type":"object","properties":{"product":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"handle":{"type":"string","maxLength":255,"pattern":"^[a-z0-9][a-z0-9-]*$"},"description_html":{"description":"Sanitised to the rich-text subset the editor supports.","anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"status":{"type":"string","enum":["draft","active","archived"]},"product_type":{"type":"string","maxLength":255},"vendor":{"type":"string","maxLength":255},"tags":{"maxItems":250,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},"options":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["name","values"]}},"variants":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/VariantInput"}}},"required":["title","variants"]}},"required":["product"]},"VariantInput":{"type":"object","properties":{"id":{"description":"An existing variant to update; omit to add one.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"option1":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"option2":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"option3":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"sku":{"type":"string","maxLength":255},"barcode":{"type":"string","maxLength":255},"price":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"compare_at_price":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},{"type":"null"}]},"weight_grams":{"anyOf":[{"type":"integer","minimum":0,"maximum":1000000},{"type":"null"}]},"requires_shipping":{"type":"boolean"},"taxable":{"type":"boolean"},"track_inventory":{"type":"boolean"},"inventory_policy":{"type":"string","enum":["deny","continue"]}},"required":["price"]},"ProductUpdate":{"type":"object","properties":{"product":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"handle":{"type":"string","maxLength":255,"pattern":"^[a-z0-9][a-z0-9-]*$"},"description_html":{"description":"Sanitised to the rich-text subset the editor supports.","anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"status":{"type":"string","enum":["draft","active","archived"]},"product_type":{"type":"string","maxLength":255},"vendor":{"type":"string","maxLength":255},"tags":{"maxItems":250,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},"options":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["name","values"]}},"variants":{"description":"The full variant list: variants left out are deleted.","minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/VariantInput"}}}}},"required":["product"]},"Empty":{"type":"object","properties":{},"additionalProperties":false},"Collection":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"handle":{"type":"string"},"description_html":{"type":["string","null"]},"kind":{"type":"string","enum":["manual","smart"]},"rules":{"anyOf":[{},{"type":"null"}]},"disjunctive":{"type":"boolean"},"sort_order":{"type":"string"},"published_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"product_ids":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}],"description":"Manual collections only."}},"required":["id","title","handle","description_html","kind","rules","disjunctive","sort_order","published_at","created_at","updated_at","product_ids"],"additionalProperties":false},"CollectionCreate":{"type":"object","properties":{"collection":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"handle":{"type":"string","maxLength":255,"pattern":"^[a-z0-9][a-z0-9-]*$"},"description_html":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"sort_order":{"type":"string","enum":["manual","best_selling","title_asc","title_desc","price_asc","price_desc","created_desc","created_asc"]},"published":{"type":"boolean"},"product_ids":{"description":"Manual collections: the products in order.","maxItems":5000,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"rules":{"description":"Smart collections: the conditions (the same rules as the admin).","minItems":1,"maxItems":60,"type":"array","items":{"type":"object","properties":{"column":{"type":"string","enum":["tag","title","type","vendor","price","compare_at_price","inventory","variant_title"]},"relation":{"type":"string","enum":["equals","not_equals","contains","starts_with","greater_than","less_than"]},"condition":{"type":"string","minLength":1,"maxLength":255}},"required":["column","relation","condition"]}},"disjunctive":{"description":"Smart collections: any rule (true) or all rules.","type":"boolean"},"kind":{"default":"manual","type":"string","enum":["manual","smart"]}},"required":["title"]}},"required":["collection"]},"CollectionUpdate":{"type":"object","properties":{"collection":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"handle":{"type":"string","maxLength":255,"pattern":"^[a-z0-9][a-z0-9-]*$"},"description_html":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"sort_order":{"type":"string","enum":["manual","best_selling","title_asc","title_desc","price_asc","price_desc","created_desc","created_asc"]},"published":{"type":"boolean"},"product_ids":{"description":"Manual collections: the products in order.","maxItems":5000,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"rules":{"description":"Smart collections: the conditions (the same rules as the admin).","minItems":1,"maxItems":60,"type":"array","items":{"type":"object","properties":{"column":{"type":"string","enum":["tag","title","type","vendor","price","compare_at_price","inventory","variant_title"]},"relation":{"type":"string","enum":["equals","not_equals","contains","starts_with","greater_than","less_than"]},"condition":{"type":"string","minLength":1,"maxLength":255}},"required":["column","relation","condition"]}},"disjunctive":{"description":"Smart collections: any rule (true) or all rules.","type":"boolean"}}}},"required":["collection"]},"Location":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"address":{"anyOf":[{},{"type":"null"}]},"phone":{"type":["string","null"]},"is_active":{"type":"boolean"},"is_default":{"type":"boolean"},"fulfills_online_orders":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","address","phone","is_active","is_default","fulfills_online_orders","created_at","updated_at"],"additionalProperties":false},"InventoryLevel":{"type":"object","properties":{"variant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"location_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"available":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"committed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"incoming":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["variant_id","location_id","available","committed","incoming","updated_at"],"additionalProperties":false},"InventoryAdjust":{"type":"object","properties":{"variant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"location_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"delta":{"type":"integer","minimum":-1000000,"maximum":1000000},"reason":{"default":"correction","type":"string","enum":["received","correction","damaged","returned","transfer"]}},"required":["variant_id","location_id","delta"]},"InventorySet":{"type":"object","properties":{"variant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"location_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"available":{"type":"integer","minimum":0,"maximum":1000000},"reason":{"default":"correction","type":"string","enum":["received","correction","damaged","returned","transfer"]}},"required":["variant_id","location_id","available"]},"Order":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["open","closed","cancelled"]},"payment_status":{"type":"string","enum":["pending","authorized","paid","partially_paid","partially_refunded","refunded","voided"]},"fulfillment_status":{"type":"string","enum":["unfulfilled","partial","fulfilled","returned"]},"payment_method":{"type":["string","null"]},"currency":{"type":"string","minLength":3,"maxLength":3},"subtotal":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"shipping_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"discount_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"tax_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"cod_fee":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"total_refunded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","number","status","payment_status","fulfillment_status","payment_method","currency","subtotal","shipping_total","discount_total","tax_total","cod_fee","total","total_refunded","customer_id","email","phone","tags","cancelled_at","created_at","updated_at"],"additionalProperties":false},"OrderDetail":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["open","closed","cancelled"]},"payment_status":{"type":"string","enum":["pending","authorized","paid","partially_paid","partially_refunded","refunded","voided"]},"fulfillment_status":{"type":"string","enum":["unfulfilled","partial","fulfilled","returned"]},"payment_method":{"type":["string","null"]},"currency":{"type":"string","minLength":3,"maxLength":3},"subtotal":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"shipping_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"discount_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"tax_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"cod_fee":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"total_refunded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"note":{"type":["string","null"]},"shipping_address":{"anyOf":[{},{"type":"null"}]},"cancel_reason":{"type":["string","null"]},"closed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"}}},"required":["id","name","number","status","payment_status","fulfillment_status","payment_method","currency","subtotal","shipping_total","discount_total","tax_total","cod_fee","total","total_refunded","customer_id","email","phone","tags","cancelled_at","created_at","updated_at","note","shipping_address","cancel_reason","closed_at","line_items"],"additionalProperties":false},"LineItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"product_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"title":{"type":"string"},"variant_title":{"type":["string","null"]},"sku":{"type":["string","null"]},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"total_discount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"fulfillable_quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"requires_shipping":{"type":"boolean"}},"required":["id","product_id","variant_id","title","variant_title","sku","quantity","price","total_discount","fulfillable_quantity","requires_shipping"],"additionalProperties":false},"OrderUpdate":{"type":"object","properties":{"order":{"type":"object","properties":{"note":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"tags":{"maxItems":250,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}}}}},"required":["order"]},"OrderCancel":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500},"restock":{"default":true,"type":"boolean"},"notify_customer":{"default":false,"type":"boolean"}},"required":["reason"]},"Fulfillment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"order_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"location_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","open","success","cancelled","failure"]},"shipment_status":{"anyOf":[{"type":"string","enum":["booked","picked_up","in_transit","out_for_delivery","delivered","failed_attempt","returning","returned","cancelled"]},{"type":"null"}]},"courier":{"type":["string","null"]},"carrier_name":{"type":["string","null"]},"tracking_number":{"type":["string","null"]},"tracking_url":{"type":["string","null"]},"cod_amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"line_items":{"type":"array","items":{"type":"object","properties":{"line_item_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["line_item_id","quantity"],"additionalProperties":false}},"delivered_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","order_id","location_id","status","shipment_status","courier","carrier_name","tracking_number","tracking_url","cod_amount","line_items","delivered_at","cancelled_at","created_at"],"additionalProperties":false},"FulfillmentCreate":{"type":"object","properties":{"location_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"line_items":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"object","properties":{"line_item_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"quantity":{"type":"integer","minimum":1,"maximum":100000}},"required":["line_item_id","quantity"]}},"carrier_name":{"type":"string","minLength":1,"maxLength":80,"description":"Who delivers it, e.g. Own rider or the courier name."},"tracking_number":{"type":"string","minLength":3,"maxLength":80},"tracking_url":{"type":"string","maxLength":500,"format":"uri"},"cod_amount":{"description":"Defaults to what is due on delivery.","type":"integer","minimum":0,"maximum":9007199254740991},"cod_amount_reason":{"type":"string","maxLength":300}},"required":["location_id","line_items","carrier_name"]},"FulfillmentCancel":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":300}},"required":["reason"]},"FulfillmentDelivered":{"type":"object","properties":{"note":{"type":"string","maxLength":300}}},"Refund":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"order_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"shipping_amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"status":{"type":"string"},"method":{"type":"string"},"provider":{"type":["string","null"]},"reason":{"type":["string","null"]},"reference":{"type":["string","null"]},"restock":{"type":"boolean"},"line_items":{},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"completed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","order_id","amount","shipping_amount","status","method","provider","reason","reference","restock","line_items","created_at","completed_at"],"additionalProperties":false},"RefundCreate":{"type":"object","properties":{"line_items":{"default":[],"maxItems":250,"type":"array","items":{"type":"object","properties":{"line_item_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"quantity":{"type":"integer","minimum":0,"maximum":9999}},"required":["line_item_id","quantity"]}},"shipping":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"amount":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"What to refund: the computed total of the lines and shipping, or less."},"method":{"type":"string","enum":["provider","manual"],"description":"`provider`: refunded online through the order’s gateway when it supports refunds; `manual`: you already returned the money (cash, wallet, bank) and record it."},"reference":{"default":"","type":"string","maxLength":200},"reason":{"default":"","type":"string","maxLength":500},"restock":{"default":false,"type":"boolean"}},"required":["amount","method"]},"Customer":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"note":{"type":["string","null"]},"state":{"type":"string"},"accepts_email_marketing":{"type":"boolean"},"accepts_sms_marketing":{"type":"boolean"},"accepts_whatsapp":{"type":"boolean"},"orders_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_spent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"last_order_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","first_name","last_name","phone","email","tags","note","state","accepts_email_marketing","accepts_sms_marketing","accepts_whatsapp","orders_count","total_spent","last_order_at","created_at","updated_at"],"additionalProperties":false},"CustomerCreate":{"type":"object","properties":{"customer":{"type":"object","properties":{"first_name":{"type":"string","maxLength":100},"last_name":{"type":"string","maxLength":100},"phone":{"description":"A Pakistani mobile number, e.g. 0300 1234567.","type":"string","maxLength":30},"email":{"type":"string","maxLength":254},"tags":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"note":{"type":"string","maxLength":5000}}}},"required":["customer"]},"CustomerUpdate":{"type":"object","properties":{"customer":{"type":"object","properties":{"first_name":{"type":"string","maxLength":100},"last_name":{"type":"string","maxLength":100},"phone":{"description":"A Pakistani mobile number, e.g. 0300 1234567.","type":"string","maxLength":30},"email":{"type":"string","maxLength":254},"tags":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"note":{"type":"string","maxLength":5000}}}},"required":["customer"]},"Discount":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","minLength":1,"maxLength":255},"method":{"type":"string","enum":["code","automatic"]},"code":{"type":["string","null"]},"kind":{"type":"string","enum":["percentage","fixed_amount","free_shipping","bxgy","prepaid"]},"value":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Percent in basis points (1000 = 10 %) or an amount in paisa."},"allocation":{"type":"string","enum":["order","each_item"]},"value_type":{"description":"Prepaid discounts.","type":"string","enum":["percentage","fixed_amount"]},"applies_to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"all"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"products"},"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","ids"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"collections"},"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","ids"],"additionalProperties":false}]},"prerequisites":{"type":"object","properties":{"min_subtotal":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"min_quantity":{"type":"integer","minimum":1,"maximum":9007199254740991},"customer_ids":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"segment_ids":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"payment_method_types":{"maxItems":3,"type":"array","items":{"type":"string","enum":["cod","online","manual"]}}},"additionalProperties":false},"bxgy":{"type":"object","properties":{"buy":{"type":"object","properties":{"quantity":{"type":"integer","minimum":1,"maximum":9007199254740991},"applies_to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"all"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"products"},"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","ids"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"collections"},"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","ids"],"additionalProperties":false}]}},"required":["quantity","applies_to"],"additionalProperties":false},"get":{"type":"object","properties":{"quantity":{"type":"integer","minimum":1,"maximum":9007199254740991},"applies_to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"all"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"products"},"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","ids"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"collections"},"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","ids"],"additionalProperties":false}]},"percent_bps":{"type":"integer","minimum":1,"maximum":10000}},"required":["quantity","applies_to","percent_bps"],"additionalProperties":false},"max_uses_per_order":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["buy","get"],"additionalProperties":false},"combines_with":{"type":"object","properties":{"product":{"type":"boolean"},"order":{"type":"boolean"},"shipping":{"type":"boolean"}},"additionalProperties":false},"once_per_customer":{"type":"boolean"},"usage_limit":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"starts_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"ends_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["active","disabled"]},"usage_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","title","method","code","kind","value","applies_to","starts_at","status","usage_count","created_at","updated_at"],"additionalProperties":false},"DiscountInput":{"type":"object","properties":{"discount":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"method":{"type":"string","enum":["code","automatic"]},"code":{"description":"Code discounts: what shoppers type.","anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"kind":{"type":"string","enum":["percentage","fixed_amount","free_shipping","bxgy","prepaid"]},"value":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Percent in basis points (1000 = 10 %) or an amount in paisa."},"allocation":{"type":"string","enum":["order","each_item"]},"value_type":{"description":"Prepaid discounts.","type":"string","enum":["percentage","fixed_amount"]},"applies_to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"all"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"products"},"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","ids"]},{"type":"object","properties":{"type":{"type":"string","const":"collections"},"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","ids"]}]},"prerequisites":{"type":"object","properties":{"min_subtotal":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Amount in minor units (paisa for PKR)."},"min_quantity":{"type":"integer","minimum":1,"maximum":9007199254740991},"customer_ids":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"segment_ids":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"payment_method_types":{"maxItems":3,"type":"array","items":{"type":"string","enum":["cod","online","manual"]}}}},"bxgy":{"type":"object","properties":{"buy":{"type":"object","properties":{"quantity":{"type":"integer","minimum":1,"maximum":9007199254740991},"applies_to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"all"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"products"},"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","ids"]},{"type":"object","properties":{"type":{"type":"string","const":"collections"},"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","ids"]}]}},"required":["quantity","applies_to"]},"get":{"type":"object","properties":{"quantity":{"type":"integer","minimum":1,"maximum":9007199254740991},"applies_to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"all"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"products"},"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","ids"]},{"type":"object","properties":{"type":{"type":"string","const":"collections"},"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","ids"]}]},"percent_bps":{"type":"integer","minimum":1,"maximum":10000}},"required":["quantity","applies_to","percent_bps"]},"max_uses_per_order":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["buy","get"]},"combines_with":{"type":"object","properties":{"product":{"type":"boolean"},"order":{"type":"boolean"},"shipping":{"type":"boolean"}}},"once_per_customer":{"type":"boolean"},"usage_limit":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"starts_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"ends_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["active","disabled"]}},"required":["title","method","kind","value","applies_to","starts_at"]}},"required":["discount"]},"Page":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"handle":{"type":"string"},"body_html":{"type":["string","null"]},"template_suffix":{"type":["string","null"]},"seo_title":{"type":["string","null"]},"seo_description":{"type":["string","null"]},"published_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","title","handle","body_html","template_suffix","seo_title","seo_description","published_at","created_at","updated_at"],"additionalProperties":false},"PageCreate":{"type":"object","properties":{"page":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"handle":{"type":"string","maxLength":255,"pattern":"^[a-z0-9][a-z0-9-]*$"},"body_html":{"description":"Sanitised to the editor’s rich-text subset.","anyOf":[{"type":"string","maxLength":500000},{"type":"null"}]},"published":{"type":"boolean"},"seo_title":{"type":"string","maxLength":255},"seo_description":{"type":"string","maxLength":1000}},"required":["title"]}},"required":["page"]},"PageUpdate":{"type":"object","properties":{"page":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"handle":{"type":"string","maxLength":255,"pattern":"^[a-z0-9][a-z0-9-]*$"},"body_html":{"description":"Sanitised to the editor’s rich-text subset.","anyOf":[{"type":"string","maxLength":500000},{"type":"null"}]},"published":{"type":"boolean"},"seo_title":{"type":"string","maxLength":255},"seo_description":{"type":"string","maxLength":1000}}}},"required":["page"]},"Metafield":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"owner_type":{"type":"string","enum":["product","variant","collection","customer","order","page"]},"owner_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"namespace":{"type":"string"},"key":{"type":"string"},"type":{"type":"string"},"value":{},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","owner_type","owner_id","namespace","key","type","value","updated_at"],"additionalProperties":false},"MetafieldsSet":{"type":"object","properties":{"owner_type":{"type":"string","enum":["product","variant","collection","customer","order","page"]},"owner_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"metafields":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"namespace":{"type":"string","minLength":1,"maxLength":64},"key":{"type":"string","minLength":1,"maxLength":64},"value":{"description":"Matching the definition’s type; null removes the value."}},"required":["namespace","key","value"]}}},"required":["owner_type","owner_id","metafields"]},"MetafieldDefinition":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"owner_type":{"type":"string"},"namespace":{"type":"string"},"key":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","owner_type","namespace","key","type","name","description","created_at"],"additionalProperties":false},"MetafieldDefinitionCreate":{"type":"object","properties":{"definition":{"type":"object","properties":{"owner_type":{"type":"string","enum":["product","variant","collection","customer","order","page"]},"namespace":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,49}$"},"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},"type":{"type":"string","minLength":1,"maxLength":40,"description":"e.g. number_decimal, single_line_text, json"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500}},"required":["owner_type","namespace","key","type","name"]}},"required":["definition"]},"WebhookSubscription":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"topic":{"type":"string"},"address":{"type":"string"},"format":{"type":"string"},"api_version":{"type":"string"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","topic","address","format","api_version","is_active","created_at"],"additionalProperties":false},"WebhookCreate":{"type":"object","properties":{"webhook":{"type":"object","properties":{"topic":{"type":"string","enum":["orders/create","orders/paid","orders/cancelled","orders/fulfilled","products/create","products/update","products/delete","customers/create","customers/update","inventory_levels/update","app/uninstalled"]},"address":{"type":"string","maxLength":1000,"format":"uri","description":"https only."}},"required":["topic","address"]}},"required":["webhook"]},"AppCharge":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"app_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"store_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["one_time","recurring"]},"name":{"type":"string"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"paisa (Rs 1 = 100)"},"currency":{"type":"string","const":"PKR"},"return_url":{"type":"string"},"test":{"type":"boolean","description":"development store: approved but never billed"},"status":{"type":"string","enum":["pending","active","declined","cancelled"]},"activated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"confirmation_url":{"type":"string","description":"send the merchant here to approve (pending charges)"}},"required":["id","app_id","store_id","kind","name","amount","currency","return_url","test","status","activated_at","cancelled_at","created_at","updated_at","confirmation_url"],"additionalProperties":false},"ChargeCreate":{"type":"object","properties":{"charge":{"type":"object","properties":{"kind":{"type":"string","enum":["one_time","recurring"],"description":"recurring = monthly"},"name":{"type":"string","minLength":2,"maxLength":100},"amount":{"type":"integer","minimum":100,"maximum":100000000,"description":"paisa (Rs 1 = 100)"},"return_url":{"type":"string","maxLength":500,"pattern":"^https:\\/\\/","description":"on your app URL’s origin; the merchant comes back here with charge_id"}},"required":["kind","name","amount","return_url"]}},"required":["charge"]}}},"paths":{"/shop":{"get":{"operationId":"getShop","summary":"The store the app is installed on","tags":["Shop"],"x-required-scopes":[],"parameters":[{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"shop":{"$ref":"#/components/schemas/Shop"}},"required":["shop"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products":{"get":{"operationId":"listProducts","summary":"List products, newest first","tags":["Products"],"x-required-scopes":["read_products"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1–250 (default 50).","schema":{"default":50,"type":"integer","minimum":1,"maximum":250}},{"name":"page_info","in":"query","required":false,"description":"Opaque cursor from the previous response’s Link header.","schema":{"type":"string","maxLength":200}},{"name":"updated_at_min","in":"query","required":false,"description":"Only items changed at or after this time (ISO 8601).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Link":{"description":"rel=\"next\" / rel=\"previous\" page URLs","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}},"required":["products"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createProduct","summary":"Create a product with its variants","tags":["Products"],"x-required-scopes":["write_products"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"$ref":"#/components/schemas/Product"}},"required":["product"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products/{id}":{"get":{"operationId":"getProduct","summary":"One product with its variants","tags":["Products"],"x-required-scopes":["read_products"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"$ref":"#/components/schemas/Product"}},"required":["product"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"updateProduct","summary":"Update a product; fields left out keep their value","tags":["Products"],"x-required-scopes":["write_products"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"$ref":"#/components/schemas/Product"}},"required":["product"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteProduct","summary":"Delete a product","tags":["Products"],"x-required-scopes":["write_products"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Empty"}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/collections":{"get":{"operationId":"listCollections","summary":"List collections, newest first","tags":["Collections"],"x-required-scopes":["read_products"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1–250 (default 50).","schema":{"default":50,"type":"integer","minimum":1,"maximum":250}},{"name":"page_info","in":"query","required":false,"description":"Opaque cursor from the previous response’s Link header.","schema":{"type":"string","maxLength":200}},{"name":"updated_at_min","in":"query","required":false,"description":"Only items changed at or after this time (ISO 8601).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Link":{"description":"rel=\"next\" / rel=\"previous\" page URLs","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"collections":{"type":"array","items":{"$ref":"#/components/schemas/Collection"}}},"required":["collections"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createCollection","summary":"Create a manual or smart collection","tags":["Collections"],"x-required-scopes":["write_products"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCreate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"collection":{"$ref":"#/components/schemas/Collection"}},"required":["collection"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/collections/{id}":{"get":{"operationId":"getCollection","summary":"One collection (manual ones with their products)","tags":["Collections"],"x-required-scopes":["read_products"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"collection":{"$ref":"#/components/schemas/Collection"}},"required":["collection"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"updateCollection","summary":"Update a collection; fields left out keep their value","tags":["Collections"],"x-required-scopes":["write_products"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"collection":{"$ref":"#/components/schemas/Collection"}},"required":["collection"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteCollection","summary":"Delete a collection (its products stay)","tags":["Collections"],"x-required-scopes":["write_products"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Empty"}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/locations":{"get":{"operationId":"listLocations","summary":"The store’s stock locations","tags":["Inventory"],"x-required-scopes":["read_inventory"],"parameters":[{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"locations":{"type":"array","items":{"$ref":"#/components/schemas/Location"}}},"required":["locations"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/locations/{id}":{"get":{"operationId":"getLocation","summary":"One stock location","tags":["Inventory"],"x-required-scopes":["read_inventory"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/Location"}},"required":["location"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inventory_levels":{"get":{"operationId":"listInventoryLevels","summary":"Stock per variant and location (filter by location and / or variants)","tags":["Inventory"],"x-required-scopes":["read_inventory"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1–250 (default 50).","schema":{"default":50,"type":"integer","minimum":1,"maximum":250}},{"name":"page_info","in":"query","required":false,"description":"Opaque cursor from the previous response’s Link header.","schema":{"type":"string","maxLength":200}},{"name":"updated_at_min","in":"query","required":false,"description":"Only items changed at or after this time (ISO 8601).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"location_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"variant_ids","in":"query","required":false,"description":"Comma-separated variant ids (at most 100).","schema":{"type":"string","maxLength":4000}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Link":{"description":"rel=\"next\" / rel=\"previous\" page URLs","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"inventory_levels":{"type":"array","items":{"$ref":"#/components/schemas/InventoryLevel"}}},"required":["inventory_levels"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inventory_levels/adjust":{"post":{"operationId":"adjustInventory","summary":"Add to or take from available stock (send an Idempotency-Key)","tags":["Inventory"],"x-required-scopes":["write_inventory"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryAdjust"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"inventory_level":{"$ref":"#/components/schemas/InventoryLevel"}},"required":["inventory_level"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inventory_levels/set":{"post":{"operationId":"setInventory","summary":"Set available stock to a count (send an Idempotency-Key)","tags":["Inventory"],"x-required-scopes":["write_inventory"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventorySet"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"inventory_level":{"$ref":"#/components/schemas/InventoryLevel"}},"required":["inventory_level"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders":{"get":{"operationId":"listOrders","summary":"List orders, newest first","tags":["Orders"],"x-required-scopes":["read_orders"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1–250 (default 50).","schema":{"default":50,"type":"integer","minimum":1,"maximum":250}},{"name":"page_info","in":"query","required":false,"description":"Opaque cursor from the previous response’s Link header.","schema":{"type":"string","maxLength":200}},{"name":"updated_at_min","in":"query","required":false,"description":"Only items changed at or after this time (ISO 8601).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Link":{"description":"rel=\"next\" / rel=\"previous\" page URLs","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}},"required":["orders"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/{id}":{"get":{"operationId":"getOrder","summary":"One order with its line items","tags":["Orders"],"x-required-scopes":["read_orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/OrderDetail"}},"required":["order"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"updateOrder","summary":"Change an order’s note and tags","tags":["Orders"],"x-required-scopes":["write_orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/OrderDetail"}},"required":["order"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/{id}/cancel":{"post":{"operationId":"cancelOrder","summary":"Cancel an open order (stock back unless restock is false)","tags":["Orders"],"x-required-scopes":["write_orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCancel"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/OrderDetail"}},"required":["order"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/{id}/close":{"post":{"operationId":"closeOrder","summary":"Close (archive) an order","tags":["Orders"],"x-required-scopes":["write_orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/OrderDetail"}},"required":["order"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/{id}/open":{"post":{"operationId":"reopenOrder","summary":"Reopen a closed order","tags":["Orders"],"x-required-scopes":["write_orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/OrderDetail"}},"required":["order"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/{id}/fulfillments":{"get":{"operationId":"listFulfillments","summary":"An order’s fulfillments (parcels)","tags":["Fulfillments"],"x-required-scopes":["read_fulfillments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"fulfillments":{"type":"array","items":{"$ref":"#/components/schemas/Fulfillment"}}},"required":["fulfillments"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createFulfillment","summary":"Fulfil items with your own carrier and tracking (send an Idempotency-Key)","tags":["Fulfillments"],"x-required-scopes":["write_fulfillments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentCreate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"fulfillment":{"$ref":"#/components/schemas/Fulfillment"}},"required":["fulfillment"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/{id}/fulfillments/{fulfillment_id}/cancel":{"post":{"operationId":"cancelFulfillment","summary":"Cancel a fulfillment (its items go back to unfulfilled)","tags":["Fulfillments"],"x-required-scopes":["write_fulfillments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"fulfillment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentCancel"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"fulfillment":{"$ref":"#/components/schemas/Fulfillment"}},"required":["fulfillment"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/{id}/fulfillments/{fulfillment_id}/delivered":{"post":{"operationId":"markFulfillmentDelivered","summary":"Mark a parcel delivered (own riders, or a courier that stopped reporting)","tags":["Fulfillments"],"x-required-scopes":["write_fulfillments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"fulfillment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentDelivered"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"fulfillment":{"$ref":"#/components/schemas/Fulfillment"}},"required":["fulfillment"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/{id}/refunds":{"get":{"operationId":"listRefunds","summary":"An order’s refunds","tags":["Refunds"],"x-required-scopes":["read_orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"refunds":{"type":"array","items":{"$ref":"#/components/schemas/Refund"}}},"required":["refunds"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createRefund","summary":"Refund items, shipping or an amount — online through the gateway when it can, or recorded as manual (send an Idempotency-Key)","tags":["Refunds"],"x-required-scopes":["write_refunds"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundCreate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"refund":{"$ref":"#/components/schemas/Refund"}},"required":["refund"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers":{"get":{"operationId":"listCustomers","summary":"List customers, newest first","tags":["Customers"],"x-required-scopes":["read_customers"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1–250 (default 50).","schema":{"default":50,"type":"integer","minimum":1,"maximum":250}},{"name":"page_info","in":"query","required":false,"description":"Opaque cursor from the previous response’s Link header.","schema":{"type":"string","maxLength":200}},{"name":"updated_at_min","in":"query","required":false,"description":"Only items changed at or after this time (ISO 8601).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Link":{"description":"rel=\"next\" / rel=\"previous\" page URLs","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"customers":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}}},"required":["customers"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createCustomer","summary":"Create a customer (a phone number or an e-mail is required)","tags":["Customers"],"x-required-scopes":["write_customers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/Customer"}},"required":["customer"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers/{id}":{"get":{"operationId":"getCustomer","summary":"One customer","tags":["Customers"],"x-required-scopes":["read_customers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/Customer"}},"required":["customer"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"updateCustomer","summary":"Update a customer; fields left out keep their value","tags":["Customers"],"x-required-scopes":["write_customers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/Customer"}},"required":["customer"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/discounts":{"get":{"operationId":"listDiscounts","summary":"List discounts, newest first","tags":["Discounts"],"x-required-scopes":["read_discounts"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1–250 (default 50).","schema":{"default":50,"type":"integer","minimum":1,"maximum":250}},{"name":"page_info","in":"query","required":false,"description":"Opaque cursor from the previous response’s Link header.","schema":{"type":"string","maxLength":200}},{"name":"updated_at_min","in":"query","required":false,"description":"Only items changed at or after this time (ISO 8601).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Link":{"description":"rel=\"next\" / rel=\"previous\" page URLs","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"discounts":{"type":"array","items":{"$ref":"#/components/schemas/Discount"}}},"required":["discounts"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createDiscount","summary":"Create a code or automatic discount","tags":["Discounts"],"x-required-scopes":["write_discounts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"discount":{"$ref":"#/components/schemas/Discount"}},"required":["discount"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/discounts/{id}":{"get":{"operationId":"getDiscount","summary":"One discount","tags":["Discounts"],"x-required-scopes":["read_discounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"discount":{"$ref":"#/components/schemas/Discount"}},"required":["discount"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"updateDiscount","summary":"Replace a discount’s definition (and optionally its status)","tags":["Discounts"],"x-required-scopes":["write_discounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"discount":{"$ref":"#/components/schemas/Discount"}},"required":["discount"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteDiscount","summary":"Delete a discount that was never used (disable it otherwise)","tags":["Discounts"],"x-required-scopes":["write_discounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Empty"}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pages":{"get":{"operationId":"listPages","summary":"List pages, newest first","tags":["Pages"],"x-required-scopes":["read_content"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1–250 (default 50).","schema":{"default":50,"type":"integer","minimum":1,"maximum":250}},{"name":"page_info","in":"query","required":false,"description":"Opaque cursor from the previous response’s Link header.","schema":{"type":"string","maxLength":200}},{"name":"updated_at_min","in":"query","required":false,"description":"Only items changed at or after this time (ISO 8601).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Link":{"description":"rel=\"next\" / rel=\"previous\" page URLs","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"pages":{"type":"array","items":{"$ref":"#/components/schemas/Page"}}},"required":["pages"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createPage","summary":"Create a page","tags":["Pages"],"x-required-scopes":["write_content"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageCreate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/Page"}},"required":["page"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pages/{id}":{"get":{"operationId":"getPage","summary":"One page","tags":["Pages"],"x-required-scopes":["read_content"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/Page"}},"required":["page"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"updatePage","summary":"Update a page; fields left out keep their value","tags":["Pages"],"x-required-scopes":["write_content"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/Page"}},"required":["page"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deletePage","summary":"Delete a page","tags":["Pages"],"x-required-scopes":["write_content"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Empty"}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/metafields":{"get":{"operationId":"listMetafields","summary":"An owner’s metafields (needs the read scope of the owner: products, customers, orders or content)","tags":["Metafields"],"x-required-scopes":[],"parameters":[{"name":"owner_type","in":"query","required":true,"schema":{"type":"string","enum":["product","variant","collection","customer","order","page"]}},{"name":"owner_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"metafields":{"type":"array","items":{"$ref":"#/components/schemas/Metafield"}}},"required":["metafields"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"setMetafields","summary":"Set an owner’s metafield values (needs the write scope of the owner)","tags":["Metafields"],"x-required-scopes":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetafieldsSet"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"metafields":{"type":"array","items":{"$ref":"#/components/schemas/Metafield"}}},"required":["metafields"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/metafield_definitions":{"post":{"operationId":"ensureMetafieldDefinition","summary":"Make sure a metafield definition exists (idempotent; needs the write scope of the owner type)","tags":["Metafields"],"x-required-scopes":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetafieldDefinitionCreate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"definition":{"$ref":"#/components/schemas/MetafieldDefinition"}},"required":["definition"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"get":{"operationId":"listWebhooks","summary":"This app’s webhook subscriptions in the store","tags":["Webhooks"],"x-required-scopes":[],"parameters":[{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSubscription"}}},"required":["webhooks"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createWebhook","summary":"Subscribe to a topic (needs the read scope of the topic’s data)","tags":["Webhooks"],"x-required-scopes":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/WebhookSubscription"}},"required":["webhook"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}":{"delete":{"operationId":"deleteWebhook","summary":"Remove a subscription","tags":["Webhooks"],"x-required-scopes":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Empty"}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/charges":{"get":{"operationId":"listCharges","summary":"This app’s charges in the store","tags":["Billing"],"x-required-scopes":[],"parameters":[{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"charges":{"type":"array","items":{"$ref":"#/components/schemas/AppCharge"}}},"required":["charges"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createCharge","summary":"Ask the merchant to pay (one-time or monthly, PKR): send them to confirmation_url to approve; billed on their Stores. invoice","tags":["Billing"],"x-required-scopes":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChargeCreate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"charge":{"$ref":"#/components/schemas/AppCharge"}},"required":["charge"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/charges/{id}":{"get":{"operationId":"getCharge","summary":"One of this app’s charges","tags":["Billing"],"x-required-scopes":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level fields to return (id is always included).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"charge":{"$ref":"#/components/schemas/AppCharge"}},"required":["charge"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed or revoked access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The installation lacks a required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (leaky bucket: 40 burst, 2 per second)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}