{
	"openapi": "3.1.0",
	"info": {
		"title": "Starsell store API",
		"version": "1.0.0",
		"description": "REST access to one store: orders, products, collections, customers, discounts, checkouts, pages, blogs, menus, events and webhooks.\n\nAuthenticate with a store key: `Authorization: Bearer vtk_...` (Settings, API and webhooks). Read keys read; keys that can edit also write. A key acts with the permissions of the member who made it.\n\nJSON in snake_case. Money is an integer in minor units next to its currency. Lists answer `{ data, pagination }`, single objects `{ data }`, errors `{ error: { code, message } }`. 240 calls a minute per key, with X-RateLimit-* headers on every answer after the key check, and Retry-After on 429.\n\nPOST and PATCH take an `Idempotency-Key` header (1 to 255 visible characters, such as a UUID). The first call with a key runs; a repeat with the same key within 24 hours gets the same answer back, marked `Idempotent-Replayed: true`, without running again. Only answers that went through are kept: a repeat of a call that failed runs again.\n\nWebhooks POST the same shapes, signed: the body is a WebhookEvent `{ id, type, created_at, store, test?, data }`. Headers: X-Starsell-Signature (t=<unix>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\"> with the webhook secret), X-Starsell-Event (the type), X-Starsell-Delivery (the delivery id, the same on retries). Event types: order.created, order.paid, order.shipped, order.delivered, order.cancelled, order.refunded, order.edited, refund.created, return.requested, return.opened, return.received, return.closed, checkout.started, checkout.abandoned, checkout.recovered, checkout.converted, customer.first_order, product.created, product.updated, product.low_stock, product.out_of_stock."
	},
	"servers": [
		{
			"url": "https://starsell.app/api/v1"
		}
	],
	"security": [
		{
			"storeKey": []
		}
	],
	"tags": [
		{
			"name": "Store"
		},
		{
			"name": "Orders"
		},
		{
			"name": "Refunds"
		},
		{
			"name": "Returns"
		},
		{
			"name": "Products"
		},
		{
			"name": "Collections"
		},
		{
			"name": "Customers"
		},
		{
			"name": "Checkouts"
		},
		{
			"name": "Pages",
			"description": "Store pages (Online store, Pages), read only. Needs a key whose maker has Storefront access."
		},
		{
			"name": "Blogs",
			"description": "Blogs and their posts, read only, drafts and scheduled posts included (`state` says which). Visitors see `published` posts only."
		},
		{
			"name": "Menus",
			"description": "Navigation menus, read only. Items nest up to three levels; `url` is resolved now and null for a link to something deleted or hidden."
		},
		{
			"name": "Discounts",
			"description": "Codes and automatic discounts, read only. `state` is worked out from `status` and the dates when you ask. What an order got is on the order: `discounts` and `discount_minor`, and each item's `discount_minor`."
		},
		{
			"name": "Events",
			"description": "Events show once they have settled: written more than 2 seconds ago, and older than every write still in progress, so a poller that moves `after` forward never steps over one that commits late. Kept for 90 days."
		},
		{
			"name": "Webhooks",
			"description": "A webhook gets a signed POST for each event it picked. The body is a WebhookEvent: `{ id, type, created_at, store: { id, name, slug }, test?, data }`, with `data` as on the event in /events.\n\nDelivery headers: `Content-Type: application/json`, `User-Agent: Starsell-Webhooks/1.0`, `X-Starsell-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the secret>`, `X-Starsell-Event: <type>`, `X-Starsell-Delivery: <delivery id>` (the same on every retry).\n\nAny 2xx within 10 seconds is a success. Failures are retried with backoff for a day; a webhook failing for 3 days turns off. URLs must be https and reach a public address. Deliveries are kept for 30 days."
		}
	],
	"paths": {
		"/stores/{storeId}": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				}
			],
			"get": {
				"tags": ["Store"],
				"summary": "Get the store",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"format": "uuid"
												},
												"name": {
													"type": "string"
												},
												"slug": {
													"type": "string"
												},
												"currency": {
													"type": "string"
												},
												"language": {
													"type": "string"
												},
												"languages": {
													"type": "array",
													"items": {
														"type": "string"
													}
												},
												"status": {
													"type": "string"
												},
												"url": {
													"type": "string"
												},
												"admin_url": {
													"type": "string"
												},
												"key": {
													"type": "object",
													"properties": {
														"name": {
															"type": "string"
														},
														"scope": {
															"type": "string",
															"enum": ["read", "write"]
														}
													},
													"required": ["name", "scope"]
												}
											},
											"required": [
												"id",
												"name",
												"slug",
												"currency",
												"language",
												"languages",
												"status",
												"url",
												"admin_url",
												"key"
											]
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"description": "The store the key reaches.",
				"operationId": "getStore"
			}
		},
		"/stores/{storeId}/orders": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				}
			],
			"get": {
				"tags": ["Orders"],
				"summary": "List orders",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Order"
											}
										},
										"pagination": {
											"$ref": "#/components/schemas/Pagination"
										}
									},
									"required": ["data", "pagination"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"maximum": 100,
							"default": 25
						}
					},
					{
						"name": "page",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"default": 1
						}
					},
					{
						"name": "status",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"enum": ["open", "fulfilled", "cancelled"]
						}
					},
					{
						"name": "payment_status",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"enum": ["paid", "pending", "partially_refunded", "refunded", "test"]
						}
					},
					{
						"name": "fulfillment_status",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"enum": ["unfulfilled", "sent_to_supplier", "shipped", "delivered", "returned"]
						}
					},
					{
						"name": "channel",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "email",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "The customer's email, exact"
					},
					{
						"name": "q",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "Number, name, email or tracking"
					},
					{
						"name": "created_after",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"format": "date-time"
						}
					},
					{
						"name": "created_before",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"format": "date-time"
						}
					},
					{
						"name": "updated_after",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"format": "date-time"
						}
					},
					{
						"name": "sort",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"enum": ["created_desc", "created_asc", "updated_desc", "updated_asc"]
						}
					}
				],
				"description": "List orders, newest first.",
				"operationId": "listOrders"
			}
		},
		"/stores/{storeId}/orders/{orderId}": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				},
				{
					"name": "orderId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The order id, or its number (1042)"
				}
			],
			"get": {
				"tags": ["Orders"],
				"summary": "Get an order",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"$ref": "#/components/schemas/Order"
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"description": "Get an order.",
				"operationId": "getOrder"
			},
			"patch": {
				"tags": ["Orders"],
				"summary": "Update an order",
				"description": "Move an order on: ship with tracking, deliver, cancel, mark paid, refund in full, add a note, set tags or the staff note, archive. Everything sent is applied together, or nothing is. Needs a key that can edit. Send an Idempotency-Key to make a retry safe: a repeat within 24 hours gets the first answer back instead of running again.",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"fulfillment_status": {
										"type": "string",
										"enum": ["sent_to_supplier", "shipped", "delivered", "returned"]
									},
									"status": {
										"type": "string",
										"enum": ["cancelled"]
									},
									"payment_status": {
										"type": "string",
										"enum": ["paid", "refunded"]
									},
									"tracking": {
										"type": "string",
										"description": "With fulfillment_status shipped, or alone to change it on an order that left"
									},
									"note": {
										"type": "string",
										"description": "Added to the order timeline. Each call adds it again, unless it repeats an Idempotency-Key"
									},
									"tags": {
										"type": "array",
										"items": {
											"type": "string",
											"description": "Replaces the order tags"
										}
									},
									"staff_note": {
										"anyOf": [
											{
												"type": "string",
												"description": "The team's own note. null clears it"
											},
											{
												"type": "null"
											}
										]
									},
									"archived": {
										"type": "boolean",
										"description": "true archives the order, false brings it back"
									}
								}
							}
						}
					}
				},
				"parameters": [
					{
						"$ref": "#/components/parameters/IdempotencyKey"
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Idempotent-Replayed": {
								"$ref": "#/components/headers/IdempotentReplayed"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"$ref": "#/components/schemas/Order"
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"409": {
						"description": "The order moved on and the change is not possible from where it is now, or a call with the same Idempotency-Key is still running. Code `conflict`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"operationId": "updateOrder"
			}
		},
		"/stores/{storeId}/orders/{orderId}/refunds": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				},
				{
					"name": "orderId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The order id, or its number (1042)"
				}
			],
			"get": {
				"tags": ["Refunds"],
				"summary": "List refunds",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Refund"
											}
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"description": "List an order's refunds, oldest first.",
				"operationId": "listRefunds"
			},
			"post": {
				"tags": ["Refunds"],
				"summary": "Create a refund",
				"description": "Refund units of lines, shipping and/or an amount. Each unit goes back in stock at most once, and money back never passes what the customer still has paid in. The order becomes partially_refunded, or refunded once nothing is left. Needs a key that can edit. Send an Idempotency-Key to make a retry safe: a repeat within 24 hours gets the first answer back instead of running again.",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"lines": {
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"order_item_id": {
													"type": "string",
													"format": "uuid"
												},
												"quantity": {
													"type": "integer",
													"minimum": 1
												}
											},
											"required": ["order_item_id", "quantity"]
										}
									},
									"shipping_minor": {
										"type": "integer",
										"description": "Shipping to give back, with its VAT when VAT was added on top"
									},
									"amount_minor": {
										"type": "integer",
										"description": "Your own amount. Leave out for what the lines and shipping are worth"
									},
									"reason": {
										"type": "string"
									},
									"restock": {
										"type": "boolean",
										"description": "Put the refunded units back in stock (units already back are skipped)"
									},
									"to_store_credit": {
										"type": "boolean",
										"description": "Add it to the customer's store credit instead of the card"
									},
									"return_id": {
										"type": "string",
										"description": "The return this refund is for: it gets linked to it",
										"format": "uuid"
									}
								},
								"required": []
							}
						}
					}
				},
				"parameters": [
					{
						"$ref": "#/components/parameters/IdempotencyKey"
					}
				],
				"responses": {
					"201": {
						"description": "Created",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Idempotent-Replayed": {
								"$ref": "#/components/headers/IdempotentReplayed"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"$ref": "#/components/schemas/Refund"
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"409": {
						"description": "The order is not paid, or is refunded already, or a call with the same Idempotency-Key is still running. Code `conflict`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"operationId": "createRefund"
			}
		},
		"/stores/{storeId}/orders/{orderId}/returns": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				},
				{
					"name": "orderId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The order id, or its number (1042)"
				}
			],
			"get": {
				"tags": ["Returns"],
				"summary": "List an order's returns",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Return"
											}
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"description": "List an order's returns.",
				"operationId": "listOrderReturns"
			},
			"post": {
				"tags": ["Returns"],
				"summary": "Create a return",
				"description": "Open a return: the units coming back and why, a note, and what the customer gets in exchange. Units can not pass what was bought and not refunded or on another return. Needs a key that can edit. Send an Idempotency-Key to make a retry safe: a repeat within 24 hours gets the first answer back instead of running again.",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"lines": {
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"order_item_id": {
													"type": "string",
													"format": "uuid"
												},
												"quantity": {
													"type": "integer",
													"minimum": 1
												},
												"reason": {
													"type": "string",
													"enum": ["size", "damaged", "not_as_described", "changed_mind", "wrong_item", "other"]
												},
												"note": {
													"type": "string"
												}
											},
											"required": ["order_item_id", "quantity", "reason"]
										}
									},
									"note": {
										"type": "string"
									},
									"exchange_lines": {
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"variant_id": {
													"type": "string",
													"format": "uuid"
												},
												"quantity": {
													"type": "integer",
													"minimum": 1
												},
												"price_minor": {
													"type": "integer",
													"description": "Leave out for the version price"
												}
											},
											"required": ["variant_id", "quantity"]
										}
									},
									"tracking": {
										"type": "string"
									}
								},
								"required": ["lines"]
							}
						}
					}
				},
				"parameters": [
					{
						"$ref": "#/components/parameters/IdempotencyKey"
					}
				],
				"responses": {
					"201": {
						"description": "Created",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Idempotent-Replayed": {
								"$ref": "#/components/headers/IdempotentReplayed"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"$ref": "#/components/schemas/Return"
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"409": {
						"description": "The order is cancelled, or a call with the same Idempotency-Key is still running. Code `conflict`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"operationId": "createReturn"
			}
		},
		"/stores/{storeId}/returns": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				}
			],
			"get": {
				"tags": ["Returns"],
				"summary": "List returns",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Return"
											}
										},
										"pagination": {
											"$ref": "#/components/schemas/Pagination"
										}
									},
									"required": ["data", "pagination"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"maximum": 100,
							"default": 25
						}
					},
					{
						"name": "page",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"default": 1
						}
					},
					{
						"name": "status",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"enum": ["requested", "open", "in_transit", "received", "closed", "declined"]
						}
					}
				],
				"description": "List returns, newest first.",
				"operationId": "listReturns"
			}
		},
		"/stores/{storeId}/returns/{returnId}": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				},
				{
					"name": "returnId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The return id"
				}
			],
			"patch": {
				"tags": ["Returns"],
				"summary": "Update a return",
				"description": "Move a return on: open (approve a request, or open a closed one again), declined, in_transit with tracking, received (restock puts the units back, each unit once) or closed. Needs a key that can edit. Send an Idempotency-Key to make a retry safe: a repeat within 24 hours gets the first answer back instead of running again.",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"status": {
										"type": "string",
										"enum": ["open", "declined", "in_transit", "received", "closed"]
									},
									"tracking": {
										"type": "string"
									},
									"restock": {
										"type": "boolean",
										"description": "With received: put the units back in stock"
									}
								},
								"required": ["status"]
							}
						}
					}
				},
				"parameters": [
					{
						"$ref": "#/components/parameters/IdempotencyKey"
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Idempotent-Replayed": {
								"$ref": "#/components/headers/IdempotentReplayed"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"$ref": "#/components/schemas/Return"
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"409": {
						"description": "The return moved on and the change is not possible from where it is now, or a call with the same Idempotency-Key is still running. Code `conflict`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"operationId": "updateReturn"
			}
		},
		"/stores/{storeId}/products": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				}
			],
			"get": {
				"tags": ["Products"],
				"summary": "List products",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Product"
											}
										},
										"pagination": {
											"$ref": "#/components/schemas/Pagination"
										}
									},
									"required": ["data", "pagination"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"maximum": 100,
							"default": 25
						}
					},
					{
						"name": "page",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"default": 1
						}
					},
					{
						"name": "status",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"enum": ["active", "draft", "archived"]
						}
					},
					{
						"name": "q",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "Title or handle"
					},
					{
						"name": "sku",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updated_after",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"format": "date-time"
						}
					},
					{
						"name": "sort",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"enum": ["created_asc", "updated_desc"]
						}
					}
				],
				"description": "List products.",
				"operationId": "listProducts"
			}
		},
		"/stores/{storeId}/products/{productId}": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				},
				{
					"name": "productId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The product id or handle"
				}
			],
			"get": {
				"tags": ["Products"],
				"summary": "Get a product",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"$ref": "#/components/schemas/Product"
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"description": "Get a product.",
				"operationId": "getProduct"
			},
			"patch": {
				"tags": ["Products"],
				"summary": "Update a product",
				"description": "Change the status, prices or stock. Needs a key that can edit. Send an Idempotency-Key to make a retry safe: a repeat within 24 hours gets the first answer back instead of running again.",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"status": {
										"type": "string",
										"enum": ["active", "draft", "archived"]
									},
									"variants": {
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"format": "uuid"
												},
												"price_minor": {
													"type": "integer"
												},
												"compare_at_minor": {
													"anyOf": [
														{
															"type": "integer"
														},
														{
															"type": "null"
														}
													]
												},
												"stock": {
													"anyOf": [
														{
															"type": "integer",
															"description": "Null stops tracking"
														},
														{
															"type": "null"
														}
													]
												}
											},
											"required": ["id"]
										}
									}
								}
							}
						}
					}
				},
				"parameters": [
					{
						"$ref": "#/components/parameters/IdempotencyKey"
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Idempotent-Replayed": {
								"$ref": "#/components/headers/IdempotentReplayed"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"$ref": "#/components/schemas/Product"
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"409": {
						"description": "A call with the same Idempotency-Key is still running. Code `conflict`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"operationId": "updateProduct"
			}
		},
		"/stores/{storeId}/collections": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				}
			],
			"get": {
				"tags": ["Collections"],
				"summary": "List collections",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Collection"
											}
										},
										"pagination": {
											"$ref": "#/components/schemas/Pagination"
										}
									},
									"required": ["data", "pagination"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"maximum": 100,
							"default": 25
						}
					},
					{
						"name": "page",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"default": 1
						}
					}
				],
				"description": "List collections with their product ids.",
				"operationId": "listCollections"
			}
		},
		"/stores/{storeId}/pages": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				}
			],
			"get": {
				"tags": ["Pages"],
				"summary": "List pages",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/StorePage"
											}
										},
										"pagination": {
											"$ref": "#/components/schemas/Pagination"
										}
									},
									"required": ["data", "pagination"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"maximum": 100,
							"default": 25
						}
					},
					{
						"name": "page",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"default": 1
						}
					},
					{
						"name": "status",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"enum": ["draft", "published"]
						}
					}
				],
				"description": "List store pages.",
				"operationId": "listPages"
			}
		},
		"/stores/{storeId}/pages/{pageId}": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				},
				{
					"name": "pageId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The page id or handle"
				}
			],
			"get": {
				"tags": ["Pages"],
				"summary": "Get a page",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"$ref": "#/components/schemas/StorePage"
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"description": "Get a store page.",
				"operationId": "getPage"
			}
		},
		"/stores/{storeId}/blogs": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				}
			],
			"get": {
				"tags": ["Blogs"],
				"summary": "List blogs",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Blog"
											}
										},
										"pagination": {
											"$ref": "#/components/schemas/Pagination"
										}
									},
									"required": ["data", "pagination"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"description": "List blogs with their post counts.",
				"operationId": "listBlogs"
			}
		},
		"/stores/{storeId}/posts": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				}
			],
			"get": {
				"tags": ["Blogs"],
				"summary": "List blog posts",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/BlogPost"
											}
										},
										"pagination": {
											"$ref": "#/components/schemas/Pagination"
										}
									},
									"required": ["data", "pagination"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"maximum": 100,
							"default": 25
						}
					},
					{
						"name": "page",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"default": 1
						}
					},
					{
						"name": "blog",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "A blog id or handle"
					},
					{
						"name": "state",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"enum": ["draft", "scheduled", "published"]
						}
					},
					{
						"name": "tag",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "Posts with this tag"
					}
				],
				"description": "List blog posts, newest first.",
				"operationId": "listPosts"
			}
		},
		"/stores/{storeId}/posts/{postId}": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				},
				{
					"name": "postId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The post id"
				}
			],
			"get": {
				"tags": ["Blogs"],
				"summary": "Get a blog post",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"$ref": "#/components/schemas/BlogPost"
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"description": "Get a blog post.",
				"operationId": "getPost"
			}
		},
		"/stores/{storeId}/menus": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				}
			],
			"get": {
				"tags": ["Menus"],
				"summary": "List menus",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Menu"
											}
										},
										"pagination": {
											"$ref": "#/components/schemas/Pagination"
										}
									},
									"required": ["data", "pagination"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"description": "List menus with their items.",
				"operationId": "listMenus"
			}
		},
		"/stores/{storeId}/menus/{menuId}": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				},
				{
					"name": "menuId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The menu id or handle (main-menu, footer)"
				}
			],
			"get": {
				"tags": ["Menus"],
				"summary": "Get a menu",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"$ref": "#/components/schemas/Menu"
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"description": "Get a menu.",
				"operationId": "getMenu"
			}
		},
		"/stores/{storeId}/customers": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				}
			],
			"get": {
				"tags": ["Customers"],
				"summary": "List customers",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/StoreCustomer"
											}
										},
										"pagination": {
											"$ref": "#/components/schemas/Pagination"
										}
									},
									"required": ["data", "pagination"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"maximum": 100,
							"default": 25
						}
					},
					{
						"name": "page",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"default": 1
						}
					},
					{
						"name": "q",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "Name, email or phone"
					},
					{
						"name": "email",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "One email, any case"
					},
					{
						"name": "tag",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "Customers with this tag"
					},
					{
						"name": "accepts_marketing",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"enum": ["true", "false"]
						},
						"description": "Email marketing consent"
					},
					{
						"name": "updated_after",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"format": "date-time"
						}
					}
				],
				"description": "List customers (everyone who ordered, signed in to their account, or was added or imported), latest order first.",
				"operationId": "listCustomers"
			}
		},
		"/stores/{storeId}/customers/{customerId}": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				},
				{
					"name": "customerId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The customer id, or their email"
				}
			],
			"get": {
				"tags": ["Customers"],
				"summary": "Get a customer",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"$ref": "#/components/schemas/StoreCustomerDetail"
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"description": "Get a customer with their addresses and latest store credit entries.",
				"operationId": "getCustomer"
			}
		},
		"/stores/{storeId}/discounts": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				}
			],
			"get": {
				"tags": ["Discounts"],
				"summary": "List discounts",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Discount"
											}
										},
										"pagination": {
											"$ref": "#/components/schemas/Pagination"
										}
									},
									"required": ["data", "pagination"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"maximum": 100,
							"default": 25
						}
					},
					{
						"name": "page",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"default": 1
						}
					},
					{
						"name": "method",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"enum": ["code", "automatic"]
						}
					},
					{
						"name": "kind",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"enum": ["amount_off_products", "amount_off_order", "buy_x_get_y", "free_shipping"]
						}
					},
					{
						"name": "state",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"enum": ["active", "scheduled", "expired", "off"]
						}
					},
					{
						"name": "code",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "One code, any case"
					},
					{
						"name": "updated_after",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"format": "date-time"
						}
					}
				],
				"description": "List discounts, newest first.",
				"operationId": "listDiscounts"
			}
		},
		"/stores/{storeId}/discounts/{discountId}": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				},
				{
					"name": "discountId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The discount id, or its code"
				}
			],
			"get": {
				"tags": ["Discounts"],
				"summary": "Get a discount",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"$ref": "#/components/schemas/Discount"
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"description": "Get a discount by id or code.",
				"operationId": "getDiscount"
			}
		},
		"/stores/{storeId}/checkouts": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				}
			],
			"get": {
				"tags": ["Checkouts"],
				"summary": "List checkouts",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Checkout"
											}
										},
										"pagination": {
											"$ref": "#/components/schemas/Pagination"
										}
									},
									"required": ["data", "pagination"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"maximum": 100,
							"default": 25
						}
					},
					{
						"name": "page",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"default": 1
						}
					},
					{
						"name": "status",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"enum": ["open", "abandoned", "recovered", "converted", "expired"]
						}
					},
					{
						"name": "email",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "created_after",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"format": "date-time"
						}
					},
					{
						"name": "updated_after",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string",
							"format": "date-time"
						},
						"description": "Last activity after"
					}
				],
				"description": "List checkouts, latest activity first.",
				"operationId": "listCheckouts"
			}
		},
		"/stores/{storeId}/checkouts/{checkoutId}": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				},
				{
					"name": "checkoutId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The checkout id"
				}
			],
			"get": {
				"tags": ["Checkouts"],
				"summary": "Get a checkout",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"$ref": "#/components/schemas/Checkout"
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"description": "Get a checkout with its recovery link.",
				"operationId": "getCheckout"
			}
		},
		"/stores/{storeId}/events": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				}
			],
			"get": {
				"tags": ["Events"],
				"summary": "List events",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Event"
											}
										},
										"pagination": {
											"type": "object",
											"properties": {
												"limit": {
													"type": "integer"
												},
												"next_after": {
													"type": "string",
													"description": "The id to send as `after` next. On an empty page, the `after` you sent (\"0\" without one)"
												},
												"has_more": {
													"type": "boolean"
												}
											},
											"required": ["limit", "next_after", "has_more"]
										}
									},
									"required": ["data", "pagination"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"parameters": [
					{
						"name": "after",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 0
						},
						"description": "Only events after this id"
					},
					{
						"name": "type",
						"in": "query",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "One type or several, comma separated"
					},
					{
						"name": "limit",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"maximum": 100,
							"default": 50
						}
					}
				],
				"description": "Events in order. Poll with `after` set to `next_after`. An event younger than 2 seconds, or than a write still in progress, waits for the next poll.",
				"operationId": "listEvents"
			}
		},
		"/stores/{storeId}/webhooks": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				}
			],
			"get": {
				"tags": ["Webhooks"],
				"summary": "List webhooks",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Webhook"
											}
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"description": "List webhooks.",
				"operationId": "listWebhooks"
			},
			"post": {
				"tags": ["Webhooks"],
				"summary": "Create a webhook",
				"description": "Add a webhook. The answer has the signing secret, shown once (and again to a repeat of its Idempotency-Key). Needs a key that can edit. Send an Idempotency-Key to make a retry safe: a repeat within 24 hours gets the first answer back instead of running again.",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"url": {
										"type": "string",
										"description": "https, reaching a public address. Up to 2000 characters"
									},
									"events": {
										"type": "array",
										"items": {
											"type": "string",
											"enum": [
												"*",
												"order.created",
												"order.paid",
												"order.shipped",
												"order.delivered",
												"order.cancelled",
												"order.refunded",
												"order.edited",
												"refund.created",
												"return.requested",
												"return.opened",
												"return.received",
												"return.closed",
												"checkout.started",
												"checkout.abandoned",
												"checkout.recovered",
												"checkout.converted",
												"customer.first_order",
												"product.created",
												"product.updated",
												"product.low_stock",
												"product.out_of_stock"
											]
										}
									},
									"description": {
										"type": "string"
									}
								},
								"required": ["url", "events"]
							}
						}
					}
				},
				"parameters": [
					{
						"$ref": "#/components/parameters/IdempotencyKey"
					}
				],
				"responses": {
					"201": {
						"description": "Created",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Idempotent-Replayed": {
								"$ref": "#/components/headers/IdempotentReplayed"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"allOf": [
												{
													"$ref": "#/components/schemas/Webhook"
												},
												{
													"type": "object",
													"properties": {
														"secret": {
															"type": "string",
															"description": "whsec_..., shown once"
														}
													},
													"required": ["secret"]
												}
											]
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"409": {
						"description": "The store already has 20 webhooks, or a call with the same Idempotency-Key is still running. Code `conflict`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"operationId": "createWebhook"
			}
		},
		"/stores/{storeId}/webhooks/{webhookId}": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				},
				{
					"name": "webhookId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The webhook id"
				}
			],
			"get": {
				"tags": ["Webhooks"],
				"summary": "Get a webhook",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"$ref": "#/components/schemas/Webhook"
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"description": "Get a webhook.",
				"operationId": "getWebhook"
			},
			"patch": {
				"tags": ["Webhooks"],
				"summary": "Update a webhook",
				"description": "Change a webhook, or turn it on or off. Needs a key that can edit. Send an Idempotency-Key to make a retry safe: a repeat within 24 hours gets the first answer back instead of running again.",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"url": {
										"type": "string",
										"description": "https, reaching a public address"
									},
									"events": {
										"type": "array",
										"items": {
											"type": "string",
											"enum": [
												"*",
												"order.created",
												"order.paid",
												"order.shipped",
												"order.delivered",
												"order.cancelled",
												"order.refunded",
												"order.edited",
												"refund.created",
												"return.requested",
												"return.opened",
												"return.received",
												"return.closed",
												"checkout.started",
												"checkout.abandoned",
												"checkout.recovered",
												"checkout.converted",
												"customer.first_order",
												"product.created",
												"product.updated",
												"product.low_stock",
												"product.out_of_stock"
											]
										}
									},
									"description": {
										"type": "string"
									},
									"active": {
										"type": "boolean"
									}
								}
							}
						}
					}
				},
				"parameters": [
					{
						"$ref": "#/components/parameters/IdempotencyKey"
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Idempotent-Replayed": {
								"$ref": "#/components/headers/IdempotentReplayed"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"$ref": "#/components/schemas/Webhook"
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"409": {
						"description": "A call with the same Idempotency-Key is still running. Code `conflict`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"operationId": "updateWebhook"
			},
			"delete": {
				"tags": ["Webhooks"],
				"summary": "Delete a webhook",
				"description": "Delete a webhook. Needs a key that can edit.",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"format": "uuid"
												},
												"deleted": {
													"type": "boolean"
												}
											},
											"required": ["id", "deleted"]
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"operationId": "deleteWebhook"
			}
		},
		"/stores/{storeId}/webhooks/{webhookId}/test": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				},
				{
					"name": "webhookId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The webhook id"
				}
			],
			"post": {
				"tags": ["Webhooks"],
				"summary": "Send a test delivery",
				"description": "Send a test delivery now. With type, the latest real event of that type is the sample, marked test: true. Needs a key that can edit. Send an Idempotency-Key to make a retry safe: a repeat within 24 hours gets the first answer back instead of running again.",
				"requestBody": {
					"required": false,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"type": {
										"type": "string",
										"enum": [
											"order.created",
											"order.paid",
											"order.shipped",
											"order.delivered",
											"order.cancelled",
											"order.refunded",
											"order.edited",
											"refund.created",
											"return.requested",
											"return.opened",
											"return.received",
											"return.closed",
											"checkout.started",
											"checkout.abandoned",
											"checkout.recovered",
											"checkout.converted",
											"customer.first_order",
											"product.created",
											"product.updated",
											"product.low_stock",
											"product.out_of_stock"
										]
									}
								},
								"required": []
							}
						}
					}
				},
				"parameters": [
					{
						"$ref": "#/components/parameters/IdempotencyKey"
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Idempotent-Replayed": {
								"$ref": "#/components/headers/IdempotentReplayed"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "object",
											"properties": {
												"delivery_id": {
													"type": "integer"
												},
												"type": {
													"type": "string"
												},
												"ok": {
													"type": "boolean"
												},
												"response_status": {
													"anyOf": [
														{
															"type": "integer"
														},
														{
															"type": "null"
														}
													]
												},
												"response_body": {
													"type": "string"
												},
												"duration_ms": {
													"type": "integer"
												},
												"error": {
													"anyOf": [
														{
															"type": "string"
														},
														{
															"type": "null"
														}
													]
												}
											},
											"required": [
												"delivery_id",
												"type",
												"ok",
												"response_status",
												"response_body",
												"duration_ms",
												"error"
											]
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"409": {
						"description": "A call with the same Idempotency-Key is still running. Code `conflict`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"operationId": "testWebhook"
			}
		},
		"/stores/{storeId}/webhooks/{webhookId}/secret": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				},
				{
					"name": "webhookId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The webhook id"
				}
			],
			"post": {
				"tags": ["Webhooks"],
				"summary": "Rotate the signing secret",
				"description": "Make a new signing secret, shown once. Needs a key that can edit. Send an Idempotency-Key to make a retry safe: a repeat within 24 hours gets the first answer back instead of running again.",
				"parameters": [
					{
						"$ref": "#/components/parameters/IdempotencyKey"
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Idempotent-Replayed": {
								"$ref": "#/components/headers/IdempotentReplayed"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"format": "uuid"
												},
												"secret": {
													"type": "string"
												}
											},
											"required": ["id", "secret"]
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"409": {
						"description": "A call with the same Idempotency-Key is still running. Code `conflict`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"operationId": "rotateWebhookSecret"
			}
		},
		"/stores/{storeId}/webhooks/{webhookId}/deliveries": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				},
				{
					"name": "webhookId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The webhook id"
				}
			],
			"get": {
				"tags": ["Webhooks"],
				"summary": "List deliveries",
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/Delivery"
											}
										},
										"pagination": {
											"type": "object",
											"properties": {
												"limit": {
													"type": "integer"
												},
												"next_before": {
													"anyOf": [
														{
															"type": "integer"
														},
														{
															"type": "null"
														}
													]
												},
												"has_more": {
													"type": "boolean"
												}
											},
											"required": ["limit", "next_before", "has_more"]
										}
									},
									"required": ["data", "pagination"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"parameters": [
					{
						"name": "before",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1
						},
						"description": "Only deliveries before this id"
					},
					{
						"name": "limit",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 1,
							"maximum": 100,
							"default": 25
						}
					}
				],
				"description": "Deliveries, newest first.",
				"operationId": "listDeliveries"
			}
		},
		"/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}/redeliver": {
			"parameters": [
				{
					"name": "storeId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The store id"
				},
				{
					"name": "webhookId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The webhook id"
				},
				{
					"name": "deliveryId",
					"in": "path",
					"required": true,
					"schema": {
						"type": "string"
					},
					"description": "The delivery id"
				}
			],
			"post": {
				"tags": ["Webhooks"],
				"summary": "Redeliver",
				"description": "Send a delivery again now. Needs a key that can edit. Send an Idempotency-Key to make a retry safe: a repeat within 24 hours gets the first answer back instead of running again.",
				"parameters": [
					{
						"$ref": "#/components/parameters/IdempotencyKey"
					}
				],
				"responses": {
					"200": {
						"description": "OK",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Idempotent-Replayed": {
								"$ref": "#/components/headers/IdempotentReplayed"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "object",
											"properties": {
												"delivery_id": {
													"type": "integer"
												},
												"ok": {
													"type": "boolean"
												},
												"response_status": {
													"anyOf": [
														{
															"type": "integer"
														},
														{
															"type": "null"
														}
													]
												},
												"duration_ms": {
													"type": "integer"
												},
												"error": {
													"anyOf": [
														{
															"type": "string"
														},
														{
															"type": "null"
														}
													]
												}
											},
											"required": ["delivery_id", "ok", "response_status", "duration_ms", "error"]
										}
									},
									"required": ["data"]
								}
							}
						}
					},
					"400": {
						"description": "The body is not valid JSON. Code `invalid`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "No key, a wrong key, or a revoked one. Code `unauthorized`",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "Another store's key, a read-only key tried to write, or the key owner lacks the permission",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "Not in this store. Code `not_found`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"409": {
						"description": "A call with the same Idempotency-Key is still running. Code `conflict`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"422": {
						"description": "A field is missing or wrong. Code `invalid`",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Over 240 calls a minute with this key. Code `rate_limited`. Wait Retry-After seconds",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							},
							"Retry-After": {
								"$ref": "#/components/headers/RetryAfter"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Something broke on Starsell's side. Code `internal`, no message. Retry with backoff",
						"headers": {
							"X-RateLimit-Limit": {
								"$ref": "#/components/headers/RateLimitLimit"
							},
							"X-RateLimit-Remaining": {
								"$ref": "#/components/headers/RateLimitRemaining"
							},
							"X-RateLimit-Reset": {
								"$ref": "#/components/headers/RateLimitReset"
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				},
				"operationId": "redeliver"
			}
		}
	},
	"components": {
		"securitySchemes": {
			"storeKey": {
				"type": "http",
				"scheme": "bearer",
				"bearerFormat": "vtk_...",
				"description": "A store API and MCP key"
			}
		},
		"parameters": {
			"IdempotencyKey": {
				"name": "Idempotency-Key",
				"in": "header",
				"required": false,
				"description": "Makes a retry safe: the first call with this key runs, and a repeat within 24 hours (same path and body) gets the same answer back without running again. Per store. A call that failed keeps nothing, so its repeat runs again. The same key with another path or body is refused with 422.",
				"schema": {
					"type": "string",
					"minLength": 1,
					"maxLength": 255,
					"pattern": "^[!-~]+$"
				}
			}
		},
		"headers": {
			"RateLimitLimit": {
				"description": "Calls a key can make each minute: 240",
				"schema": {
					"type": "integer"
				}
			},
			"RateLimitRemaining": {
				"description": "Calls left this minute, after this one",
				"schema": {
					"type": "integer"
				}
			},
			"RateLimitReset": {
				"description": "Seconds until the count starts again, 1 to 60",
				"schema": {
					"type": "integer"
				}
			},
			"RetryAfter": {
				"description": "Seconds to wait before calling again",
				"schema": {
					"type": "integer"
				}
			},
			"IdempotentReplayed": {
				"description": "`true` when this is the stored answer to an earlier call with the same Idempotency-Key",
				"schema": {
					"type": "string",
					"enum": ["true"]
				}
			}
		},
		"schemas": {
			"Customer": {
				"type": "object",
				"properties": {
					"email": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"phone": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"name": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"first_name": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					}
				},
				"required": ["email", "phone", "name", "first_name"]
			},
			"OrderItem": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"format": "uuid"
					},
					"product_id": {
						"anyOf": [
							{
								"type": "string",
								"format": "uuid"
							},
							{
								"type": "null"
							}
						]
					},
					"variant_id": {
						"anyOf": [
							{
								"type": "string",
								"format": "uuid"
							},
							{
								"type": "null"
							}
						]
					},
					"title": {
						"type": "string"
					},
					"variant_name": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"quantity": {
						"type": "integer"
					},
					"price_minor": {
						"type": "integer",
						"description": "Per unit, minor units of the order currency"
					},
					"discount_minor": {
						"type": "integer",
						"description": "The line's share of the order's discounts, for the whole line (not per unit)"
					},
					"image_url": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"parts": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"product_id": {
									"type": "string"
								},
								"variant_id": {
									"anyOf": [
										{
											"type": "string"
										},
										{
											"type": "null"
										}
									]
								},
								"title": {
									"type": "string"
								},
								"variant_name": {
									"anyOf": [
										{
											"type": "string"
										},
										{
											"type": "null"
										}
									]
								},
								"quantity": {
									"type": "integer",
									"description": "Per bundle"
								}
							},
							"required": ["product_id", "variant_id", "title", "variant_name", "quantity"]
						}
					}
				},
				"required": [
					"id",
					"product_id",
					"variant_id",
					"title",
					"variant_name",
					"quantity",
					"price_minor",
					"discount_minor",
					"image_url",
					"parts"
				]
			},
			"Order": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"format": "uuid"
					},
					"number": {
						"type": "integer"
					},
					"label": {
						"type": "string",
						"description": "The number with the store prefix and suffix, like #1042"
					},
					"status": {
						"type": "string",
						"enum": ["open", "fulfilled", "cancelled"]
					},
					"payment_status": {
						"type": "string",
						"enum": ["paid", "pending", "partially_refunded", "refunded", "test"]
					},
					"fulfillment_status": {
						"type": "string",
						"enum": ["unfulfilled", "sent_to_supplier", "shipped", "delivered", "returned"]
					},
					"currency": {
						"type": "string",
						"description": "ISO 4217, like ILS or EUR. Every amount on the order is in it"
					},
					"subtotal_minor": {
						"type": "integer",
						"description": "The items before discounts"
					},
					"discount_minor": {
						"type": "integer",
						"description": "Off the items from discounts: the items' `discount_minor` added up. Free shipping is not in it; `shipping_minor` is already what was charged"
					},
					"discounts": {
						"type": "array",
						"items": {
							"$ref": "#/components/schemas/OrderDiscount"
						}
					},
					"shipping_minor": {
						"type": "integer",
						"description": "Minor units (cents, agorot) of `currency`"
					},
					"tax_minor": {
						"type": "integer",
						"description": "Minor units (cents, agorot) of `currency`"
					},
					"tax_included": {
						"type": "boolean"
					},
					"total_minor": {
						"type": "integer",
						"description": "Minor units (cents, agorot) of `currency`"
					},
					"channel": {
						"type": "string",
						"description": "online, synce, instagram, tiktok or manual"
					},
					"tracking": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"test": {
						"type": "boolean",
						"description": "Placed in test mode: no card was charged"
					},
					"tags": {
						"type": "array",
						"items": {
							"type": "string"
						}
					},
					"staff_note": {
						"anyOf": [
							{
								"type": "string",
								"description": "The team's own note. The buyer's note is `note`"
							},
							{
								"type": "null"
							}
						]
					},
					"archived": {
						"type": "boolean",
						"description": "Archived orders leave the working lists in the admin; nothing else changes"
					},
					"archived_at": {
						"anyOf": [
							{
								"type": "string",
								"format": "date-time"
							},
							{
								"type": "null"
							}
						]
					},
					"customer": {
						"$ref": "#/components/schemas/Customer"
					},
					"shipping_address": {
						"anyOf": [
							{
								"type": "object",
								"properties": {
									"line1": {
										"type": "string"
									},
									"city": {
										"type": "string"
									},
									"zip": {
										"anyOf": [
											{
												"type": "string"
											},
											{
												"type": "null"
											}
										]
									},
									"country": {
										"type": "string",
										"description": "ISO 3166 alpha-2"
									}
								},
								"required": ["line1", "city", "zip", "country"]
							},
							{
								"type": "null"
							}
						]
					},
					"note": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"items": {
						"type": "array",
						"items": {
							"$ref": "#/components/schemas/OrderItem"
						}
					},
					"item_count": {
						"type": "integer"
					},
					"status_url": {
						"type": "string",
						"description": "The customer's own order page"
					},
					"admin_url": {
						"type": "string"
					},
					"created_at": {
						"type": "string",
						"format": "date-time"
					},
					"updated_at": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"number",
					"label",
					"status",
					"payment_status",
					"fulfillment_status",
					"currency",
					"subtotal_minor",
					"discount_minor",
					"discounts",
					"shipping_minor",
					"tax_minor",
					"tax_included",
					"total_minor",
					"channel",
					"tracking",
					"test",
					"tags",
					"staff_note",
					"archived",
					"archived_at",
					"customer",
					"shipping_address",
					"note",
					"items",
					"item_count",
					"status_url",
					"admin_url",
					"created_at",
					"updated_at"
				]
			},
			"Refund": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"format": "uuid"
					},
					"order_id": {
						"type": "string",
						"format": "uuid"
					},
					"amount_minor": {
						"type": "integer",
						"description": "Lines plus shipping, minor units of the order currency"
					},
					"shipping_minor": {
						"type": "integer",
						"description": "Shipping given back, with its VAT when VAT was added on top"
					},
					"currency": {
						"type": "string"
					},
					"lines": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"order_item_id": {
									"type": "string",
									"format": "uuid"
								},
								"quantity": {
									"type": "integer"
								},
								"amount_minor": {
									"type": "integer",
									"description": "What these units were worth"
								},
								"restocked": {
									"type": "integer",
									"description": "Units of this line that went back in stock with this refund"
								}
							},
							"required": ["order_item_id", "quantity", "amount_minor", "restocked"]
						}
					},
					"reason": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"restocked": {
						"type": "boolean",
						"description": "Some units went back in stock"
					},
					"to_store_credit": {
						"type": "boolean",
						"description": "Given back as store credit instead of to the card"
					},
					"created_at": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"order_id",
					"amount_minor",
					"shipping_minor",
					"currency",
					"lines",
					"reason",
					"restocked",
					"to_store_credit",
					"created_at"
				]
			},
			"Return": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"format": "uuid"
					},
					"order_id": {
						"type": "string",
						"format": "uuid"
					},
					"number": {
						"type": "integer",
						"description": "Per order: 1, 2..."
					},
					"label": {
						"type": "string",
						"description": "The order label plus -R and the number, like #1042-R1"
					},
					"status": {
						"type": "string",
						"description": "requested (the customer asked from their account), open, in_transit, received, closed, or declined",
						"enum": ["requested", "open", "in_transit", "received", "closed", "declined"]
					},
					"lines": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"order_item_id": {
									"type": "string",
									"format": "uuid"
								},
								"quantity": {
									"type": "integer"
								},
								"reason": {
									"type": "string",
									"enum": ["size", "damaged", "not_as_described", "changed_mind", "wrong_item", "other"]
								},
								"note": {
									"anyOf": [
										{
											"type": "string"
										},
										{
											"type": "null"
										}
									]
								},
								"restocked": {
									"type": "integer",
									"description": "Units back in stock since it was received"
								}
							},
							"required": ["order_item_id", "quantity", "reason", "note", "restocked"]
						}
					},
					"exchange_lines": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"product_id": {
									"type": "string",
									"format": "uuid"
								},
								"variant_id": {
									"anyOf": [
										{
											"type": "string",
											"format": "uuid"
										},
										{
											"type": "null"
										}
									]
								},
								"title": {
									"type": "string"
								},
								"variant_name": {
									"anyOf": [
										{
											"type": "string"
										},
										{
											"type": "null"
										}
									]
								},
								"quantity": {
									"type": "integer"
								},
								"price_minor": {
									"type": "integer",
									"description": "Minor units (cents, agorot) of `currency`"
								}
							},
							"required": ["product_id", "variant_id", "title", "variant_name", "quantity", "price_minor"]
						}
					},
					"customer_note": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"tracking": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"refund_id": {
						"anyOf": [
							{
								"type": "string",
								"description": "The refund made from this return",
								"format": "uuid"
							},
							{
								"type": "null"
							}
						]
					},
					"exchange_order_id": {
						"anyOf": [
							{
								"type": "string",
								"description": "The new order for the exchange, once made",
								"format": "uuid"
							},
							{
								"type": "null"
							}
						]
					},
					"closed_at": {
						"anyOf": [
							{
								"type": "string",
								"format": "date-time"
							},
							{
								"type": "null"
							}
						]
					},
					"created_at": {
						"type": "string",
						"format": "date-time"
					},
					"updated_at": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"order_id",
					"number",
					"label",
					"status",
					"lines",
					"exchange_lines",
					"customer_note",
					"tracking",
					"refund_id",
					"exchange_order_id",
					"closed_at",
					"created_at",
					"updated_at"
				]
			},
			"Variant": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"format": "uuid"
					},
					"name": {
						"type": "string"
					},
					"sku": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"price_minor": {
						"type": "integer",
						"description": "Minor units of the store currency"
					},
					"compare_at_minor": {
						"anyOf": [
							{
								"type": "integer"
							},
							{
								"type": "null"
							}
						]
					},
					"stock": {
						"anyOf": [
							{
								"type": "integer",
								"description": "Null when stock is not tracked"
							},
							{
								"type": "null"
							}
						]
					},
					"position": {
						"type": "integer"
					}
				},
				"required": ["id", "name", "sku", "price_minor", "compare_at_minor", "stock", "position"]
			},
			"Product": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"format": "uuid"
					},
					"handle": {
						"type": "string"
					},
					"status": {
						"type": "string",
						"enum": ["active", "draft", "archived"]
					},
					"kind": {
						"type": "string",
						"enum": ["single", "bundle"]
					},
					"title": {
						"type": "string",
						"description": "In the store language"
					},
					"titles": {
						"type": "object",
						"additionalProperties": {
							"type": "string"
						},
						"description": "Per language code"
					},
					"type": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"tags": {
						"type": "array",
						"items": {
							"type": "string"
						}
					},
					"source": {
						"type": "string",
						"enum": ["own", "cj"]
					},
					"currency": {
						"type": "string"
					},
					"price_minor": {
						"type": "integer",
						"description": "The lowest version price"
					},
					"image_url": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"images": {
						"type": "array",
						"items": {
							"type": "string"
						}
					},
					"url": {
						"type": "string"
					},
					"admin_url": {
						"type": "string"
					},
					"variants": {
						"type": "array",
						"items": {
							"$ref": "#/components/schemas/Variant"
						}
					},
					"created_at": {
						"type": "string",
						"format": "date-time"
					},
					"updated_at": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"handle",
					"status",
					"kind",
					"title",
					"titles",
					"type",
					"tags",
					"source",
					"currency",
					"price_minor",
					"image_url",
					"images",
					"url",
					"admin_url",
					"variants",
					"created_at",
					"updated_at"
				]
			},
			"Collection": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"format": "uuid"
					},
					"handle": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"titles": {
						"type": "object",
						"additionalProperties": {
							"type": "string"
						}
					},
					"kind": {
						"type": "string",
						"enum": ["manual", "smart"]
					},
					"status": {
						"type": "string",
						"enum": ["active", "draft"]
					},
					"image_url": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"url": {
						"type": "string"
					},
					"product_count": {
						"type": "integer"
					},
					"product_ids": {
						"type": "array",
						"items": {
							"type": "string",
							"format": "uuid"
						}
					},
					"created_at": {
						"type": "string",
						"format": "date-time"
					},
					"updated_at": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"handle",
					"title",
					"titles",
					"kind",
					"status",
					"image_url",
					"url",
					"product_count",
					"product_ids",
					"created_at",
					"updated_at"
				]
			},
			"Seo": {
				"type": "object",
				"properties": {
					"title": {
						"anyOf": [
							{
								"type": "string",
								"description": "Search title in the store language; null uses the title"
							},
							{
								"type": "null"
							}
						]
					},
					"description": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"image_url": {
						"anyOf": [
							{
								"type": "string",
								"description": "The sharing image"
							},
							{
								"type": "null"
							}
						]
					}
				},
				"required": ["title", "description", "image_url"]
			},
			"StorePage": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"format": "uuid"
					},
					"handle": {
						"type": "string"
					},
					"title": {
						"type": "string",
						"description": "In the store language"
					},
					"titles": {
						"type": "object",
						"additionalProperties": {
							"type": "string"
						},
						"description": "The title, by language code"
					},
					"body_html": {
						"type": "string",
						"description": "Rich text in the store language: p, h2 to h4, strong, em, u, s, a, ul, ol, li, blockquote, hr, img"
					},
					"bodies": {
						"type": "object",
						"additionalProperties": {
							"type": "string"
						},
						"description": "The body, by language code"
					},
					"status": {
						"type": "string",
						"enum": ["draft", "published"]
					},
					"published_at": {
						"anyOf": [
							{
								"type": "string",
								"format": "date-time"
							},
							{
								"type": "null"
							}
						]
					},
					"url": {
						"type": "string"
					},
					"seo": {
						"$ref": "#/components/schemas/Seo"
					},
					"created_at": {
						"type": "string",
						"format": "date-time"
					},
					"updated_at": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"handle",
					"title",
					"titles",
					"body_html",
					"bodies",
					"status",
					"published_at",
					"url",
					"seo",
					"created_at",
					"updated_at"
				]
			},
			"Blog": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"format": "uuid"
					},
					"handle": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"titles": {
						"type": "object",
						"additionalProperties": {
							"type": "string"
						},
						"description": "The name, by language code"
					},
					"url": {
						"type": "string"
					},
					"post_count": {
						"type": "integer",
						"description": "Every post, drafts included"
					},
					"created_at": {
						"type": "string",
						"format": "date-time"
					},
					"updated_at": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": ["id", "handle", "title", "titles", "url", "post_count", "created_at", "updated_at"]
			},
			"BlogPost": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"format": "uuid"
					},
					"blog_id": {
						"type": "string",
						"format": "uuid"
					},
					"handle": {
						"type": "string",
						"description": "Unique in its blog"
					},
					"title": {
						"type": "string"
					},
					"titles": {
						"type": "object",
						"additionalProperties": {
							"type": "string"
						},
						"description": "The title, by language code"
					},
					"excerpt": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"excerpts": {
						"type": "object",
						"additionalProperties": {
							"type": "string"
						},
						"description": "The excerpt, by language code"
					},
					"body_html": {
						"type": "string",
						"description": "Rich text in the store language, like a page"
					},
					"bodies": {
						"type": "object",
						"additionalProperties": {
							"type": "string"
						},
						"description": "The body, by language code"
					},
					"image_url": {
						"anyOf": [
							{
								"type": "string",
								"description": "The cover"
							},
							{
								"type": "null"
							}
						]
					},
					"author": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"tags": {
						"type": "array",
						"items": {
							"type": "string"
						}
					},
					"status": {
						"type": "string",
						"enum": ["draft", "published"]
					},
					"state": {
						"type": "string",
						"description": "Scheduled: published with `published_at` still ahead. Visitors see published only",
						"enum": ["draft", "scheduled", "published"]
					},
					"published_at": {
						"anyOf": [
							{
								"type": "string",
								"format": "date-time"
							},
							{
								"type": "null"
							}
						]
					},
					"url": {
						"type": "string"
					},
					"seo": {
						"$ref": "#/components/schemas/Seo"
					},
					"created_at": {
						"type": "string",
						"format": "date-time"
					},
					"updated_at": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"blog_id",
					"handle",
					"title",
					"titles",
					"excerpt",
					"excerpts",
					"body_html",
					"bodies",
					"image_url",
					"author",
					"tags",
					"status",
					"state",
					"published_at",
					"url",
					"seo",
					"created_at",
					"updated_at"
				]
			},
			"MenuItem": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"anyOf": [
							{
								"type": "string",
								"description": "In the store language; null takes the linked thing's name"
							},
							{
								"type": "null"
							}
						]
					},
					"titles": {
						"type": "object",
						"additionalProperties": {
							"type": "string"
						},
						"description": "The title, by language code"
					},
					"link": {
						"type": "object",
						"properties": {
							"kind": {
								"type": "string",
								"enum": [
									"home",
									"page",
									"collection",
									"product",
									"blog",
									"post",
									"collections",
									"products",
									"search",
									"url"
								]
							},
							"id": {
								"type": "string",
								"description": "For page, collection, product, blog and post",
								"format": "uuid"
							},
							"url": {
								"type": "string",
								"description": "For url"
							}
						},
						"required": ["kind"]
					},
					"url": {
						"anyOf": [
							{
								"type": "string",
								"description": "Where it goes now. Null when the page, product or post it points at is deleted or hidden"
							},
							{
								"type": "null"
							}
						]
					},
					"children": {
						"type": "array",
						"items": {
							"$ref": "#/components/schemas/MenuItem"
						}
					}
				},
				"required": ["id", "title", "titles", "link", "url", "children"]
			},
			"Menu": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"format": "uuid"
					},
					"handle": {
						"type": "string",
						"description": "main-menu and footer always exist"
					},
					"title": {
						"type": "string"
					},
					"items": {
						"type": "array",
						"items": {
							"$ref": "#/components/schemas/MenuItem"
						}
					},
					"created_at": {
						"type": "string",
						"format": "date-time"
					},
					"updated_at": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": ["id", "handle", "title", "items", "created_at", "updated_at"]
			},
			"StoreCustomer": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"format": "uuid"
					},
					"email": {
						"anyOf": [
							{
								"type": "string",
								"description": "Lower case. Null for a customer with only a phone, or one whose data was erased"
							},
							{
								"type": "null"
							}
						]
					},
					"name": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"first_name": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"last_name": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"phone": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"city": {
						"anyOf": [
							{
								"type": "string",
								"description": "Of the default address"
							},
							{
								"type": "null"
							}
						]
					},
					"country": {
						"anyOf": [
							{
								"type": "string",
								"description": "Of the default address, ISO 3166-1 alpha-2"
							},
							{
								"type": "null"
							}
						]
					},
					"language": {
						"anyOf": [
							{
								"type": "string",
								"description": "The language they shop in, for emails"
							},
							{
								"type": "null"
							}
						]
					},
					"tags": {
						"type": "array",
						"items": {
							"type": "string"
						}
					},
					"note": {
						"anyOf": [
							{
								"type": "string",
								"description": "The team's note"
							},
							{
								"type": "null"
							}
						]
					},
					"tax_exempt": {
						"type": "boolean"
					},
					"orders_count": {
						"type": "integer",
						"description": "Every order, cancelled ones included"
					},
					"spent_minor": {
						"type": "integer",
						"description": "Paid orders minus refunds, in the store currency. Test and cancelled orders count 0"
					},
					"store_credit_minor": {
						"type": "integer",
						"description": "Store credit left, in the store currency"
					},
					"currency": {
						"type": "string",
						"description": "The store currency"
					},
					"accepts_marketing": {
						"type": "boolean",
						"description": "Same as accepts_email_marketing"
					},
					"accepts_email_marketing": {
						"type": "boolean"
					},
					"email_consent_at": {
						"anyOf": [
							{
								"type": "string",
								"description": "When email consent last changed",
								"format": "date-time"
							},
							{
								"type": "null"
							}
						]
					},
					"email_consent_source": {
						"anyOf": [
							{
								"type": "string",
								"enum": ["checkout", "account", "signup_form", "admin", "import"]
							},
							{
								"type": "null"
							}
						]
					},
					"accepts_sms_marketing": {
						"type": "boolean"
					},
					"sms_consent_at": {
						"anyOf": [
							{
								"type": "string",
								"format": "date-time"
							},
							{
								"type": "null"
							}
						]
					},
					"first_order_at": {
						"anyOf": [
							{
								"type": "string",
								"format": "date-time"
							},
							{
								"type": "null"
							}
						]
					},
					"last_order_at": {
						"anyOf": [
							{
								"type": "string",
								"format": "date-time"
							},
							{
								"type": "null"
							}
						]
					},
					"erased": {
						"type": "boolean",
						"description": "The store erased their personal data: totals stay, the person is gone"
					},
					"created_at": {
						"type": "string",
						"format": "date-time"
					},
					"updated_at": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"email",
					"name",
					"first_name",
					"last_name",
					"phone",
					"city",
					"country",
					"language",
					"tags",
					"note",
					"tax_exempt",
					"orders_count",
					"spent_minor",
					"store_credit_minor",
					"currency",
					"accepts_marketing",
					"accepts_email_marketing",
					"email_consent_at",
					"email_consent_source",
					"accepts_sms_marketing",
					"sms_consent_at",
					"first_order_at",
					"last_order_at",
					"erased",
					"created_at",
					"updated_at"
				]
			},
			"StoreCustomerDetail": {
				"allOf": [
					{
						"$ref": "#/components/schemas/StoreCustomer"
					},
					{
						"type": "object",
						"properties": {
							"addresses": {
								"type": "array",
								"items": {
									"type": "object",
									"properties": {
										"first_name": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										},
										"last_name": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										},
										"company": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										},
										"line1": {
											"type": "string"
										},
										"line2": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										},
										"city": {
											"type": "string"
										},
										"region": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										},
										"zip": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										},
										"country": {
											"type": "string"
										},
										"phone": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										},
										"default": {
											"type": "boolean",
											"description": "The address checkout fills in"
										}
									},
									"required": [
										"first_name",
										"last_name",
										"company",
										"line1",
										"line2",
										"city",
										"region",
										"zip",
										"country",
										"phone",
										"default"
									]
								}
							},
							"store_credit": {
								"type": "array",
								"items": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"format": "uuid"
										},
										"amount_minor": {
											"type": "integer",
											"description": "Positive adds, negative spends"
										},
										"reason": {
											"type": "string",
											"enum": ["manual", "refund", "order", "expired"]
										},
										"order_id": {
											"anyOf": [
												{
													"type": "string",
													"format": "uuid"
												},
												{
													"type": "null"
												}
											]
										},
										"note": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										},
										"expires_at": {
											"anyOf": [
												{
													"type": "string",
													"format": "date-time"
												},
												{
													"type": "null"
												}
											]
										},
										"created_at": {
											"type": "string",
											"format": "date-time"
										}
									},
									"required": ["id", "amount_minor", "reason", "order_id", "note", "expires_at", "created_at"]
								}
							}
						},
						"required": ["addresses", "store_credit"]
					}
				]
			},
			"Checkout": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"format": "uuid"
					},
					"token": {
						"type": "string"
					},
					"url": {
						"type": "string",
						"description": "The recovery link: restores the cart and opens checkout"
					},
					"status": {
						"type": "string",
						"enum": ["open", "abandoned", "recovered", "converted", "expired"]
					},
					"currency": {
						"type": "string"
					},
					"subtotal_minor": {
						"type": "integer",
						"description": "Minor units (cents, agorot) of `currency`"
					},
					"item_count": {
						"type": "integer"
					},
					"items": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"product_id": {
									"type": "string"
								},
								"variant_id": {
									"type": "string"
								},
								"title": {
									"type": "string"
								},
								"variant_name": {
									"anyOf": [
										{
											"type": "string"
										},
										{
											"type": "null"
										}
									]
								},
								"quantity": {
									"type": "integer"
								},
								"price_minor": {
									"type": "integer",
									"description": "Minor units (cents, agorot) of `currency`"
								},
								"image_url": {
									"anyOf": [
										{
											"type": "string"
										},
										{
											"type": "null"
										}
									]
								}
							},
							"required": ["product_id", "variant_id", "title", "variant_name", "quantity", "price_minor", "image_url"]
						}
					},
					"locale": {
						"type": "string"
					},
					"market_id": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"country": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"marketing_consent": {
						"type": "boolean"
					},
					"customer": {
						"$ref": "#/components/schemas/Customer"
					},
					"order_id": {
						"anyOf": [
							{
								"type": "string",
								"format": "uuid"
							},
							{
								"type": "null"
							}
						]
					},
					"admin_url": {
						"type": "string"
					},
					"created_at": {
						"type": "string",
						"format": "date-time"
					},
					"last_activity_at": {
						"type": "string",
						"format": "date-time"
					},
					"abandoned_at": {
						"anyOf": [
							{
								"type": "string",
								"format": "date-time"
							},
							{
								"type": "null"
							}
						]
					},
					"recovered_at": {
						"anyOf": [
							{
								"type": "string",
								"format": "date-time"
							},
							{
								"type": "null"
							}
						]
					},
					"converted_at": {
						"anyOf": [
							{
								"type": "string",
								"format": "date-time"
							},
							{
								"type": "null"
							}
						]
					}
				},
				"required": [
					"id",
					"token",
					"url",
					"status",
					"currency",
					"subtotal_minor",
					"item_count",
					"items",
					"locale",
					"market_id",
					"country",
					"marketing_consent",
					"customer",
					"order_id",
					"admin_url",
					"created_at",
					"last_activity_at",
					"abandoned_at",
					"recovered_at",
					"converted_at"
				]
			},
			"OrderDiscount": {
				"type": "object",
				"properties": {
					"discount_id": {
						"anyOf": [
							{
								"type": "string",
								"description": "Null once the discount is deleted",
								"format": "uuid"
							},
							{
								"type": "null"
							}
						]
					},
					"code": {
						"anyOf": [
							{
								"type": "string",
								"description": "The code the buyer used; null for automatic discounts"
							},
							{
								"type": "null"
							}
						]
					},
					"title": {
						"type": "string"
					},
					"kind": {
						"type": "string",
						"enum": ["amount_off_products", "amount_off_order", "buy_x_get_y", "free_shipping"]
					},
					"amount_minor": {
						"type": "integer",
						"description": "Off the items, or the shipping it waived for free_shipping"
					}
				},
				"required": ["discount_id", "code", "title", "kind", "amount_minor"]
			},
			"Discount": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"format": "uuid"
					},
					"method": {
						"type": "string",
						"enum": ["code", "automatic"]
					},
					"code": {
						"anyOf": [
							{
								"type": "string",
								"description": "What buyers type, matched without case. Null for automatic discounts"
							},
							{
								"type": "null"
							}
						]
					},
					"title": {
						"type": "string",
						"description": "Staff see it; buyers see it for automatic discounts"
					},
					"kind": {
						"type": "string",
						"enum": ["amount_off_products", "amount_off_order", "buy_x_get_y", "free_shipping"]
					},
					"status": {
						"type": "string",
						"description": "The merchant's on and off",
						"enum": ["active", "off"]
					},
					"state": {
						"type": "string",
						"description": "Read from `status`, `starts_at` and `ends_at` now",
						"enum": ["active", "scheduled", "expired", "off"]
					},
					"value": {
						"anyOf": [
							{
								"$ref": "#/components/schemas/DiscountValue"
							},
							{
								"type": "null"
							}
						]
					},
					"targets": {
						"anyOf": [
							{
								"$ref": "#/components/schemas/DiscountTargets"
							},
							{
								"type": "null"
							}
						]
					},
					"requirement": {
						"type": "object",
						"properties": {
							"kind": {
								"type": "string",
								"enum": ["none", "subtotal", "quantity"]
							},
							"value": {
								"type": "integer",
								"description": "Minor units of the store currency for subtotal, items for quantity"
							}
						},
						"required": ["kind", "value"]
					},
					"buy_x_get_y": {
						"anyOf": [
							{
								"type": "object",
								"properties": {
									"buy": {
										"type": "object",
										"properties": {
											"kind": {
												"type": "string",
												"enum": ["quantity", "subtotal"]
											},
											"value": {
												"type": "integer"
											},
											"targets": {
												"$ref": "#/components/schemas/DiscountTargets"
											}
										},
										"required": ["kind", "value", "targets"]
									},
									"get": {
										"type": "object",
										"properties": {
											"quantity": {
												"type": "integer"
											},
											"targets": {
												"$ref": "#/components/schemas/DiscountTargets"
											},
											"value": {
												"$ref": "#/components/schemas/DiscountValue"
											}
										},
										"required": ["quantity", "targets", "value"]
									},
									"uses_per_order": {
										"anyOf": [
											{
												"type": "integer"
											},
											{
												"type": "null"
											}
										]
									}
								},
								"required": ["buy", "get", "uses_per_order"]
							},
							{
								"type": "null"
							}
						]
					},
					"max_shipping_minor": {
						"anyOf": [
							{
								"type": "integer",
								"description": "Free shipping only on rates up to this, in the store currency"
							},
							{
								"type": "null"
							}
						]
					},
					"combines": {
						"type": "object",
						"properties": {
							"product": {
								"type": "boolean"
							},
							"order": {
								"type": "boolean"
							},
							"shipping": {
								"type": "boolean"
							}
						},
						"required": ["product", "order", "shipping"]
					},
					"eligibility": {
						"type": "object",
						"properties": {
							"kind": {
								"type": "string",
								"enum": ["all", "customers", "tags"]
							},
							"values": {
								"type": "array",
								"items": {
									"type": "string",
									"description": "Customer ids for customers, tags for tags"
								}
							}
						},
						"required": ["kind", "values"]
					},
					"market_ids": {
						"type": "array",
						"items": {
							"type": "string",
							"description": "Empty: every market",
							"format": "uuid"
						}
					},
					"usage_limit": {
						"anyOf": [
							{
								"type": "integer",
								"description": "Total uses across all buyers"
							},
							{
								"type": "null"
							}
						]
					},
					"once_per_customer": {
						"type": "boolean",
						"description": "By email"
					},
					"used_count": {
						"type": "integer"
					},
					"starts_at": {
						"type": "string",
						"format": "date-time"
					},
					"ends_at": {
						"anyOf": [
							{
								"type": "string",
								"format": "date-time"
							},
							{
								"type": "null"
							}
						]
					},
					"created_at": {
						"type": "string",
						"format": "date-time"
					},
					"updated_at": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"method",
					"code",
					"title",
					"kind",
					"status",
					"state",
					"value",
					"targets",
					"requirement",
					"buy_x_get_y",
					"max_shipping_minor",
					"combines",
					"eligibility",
					"market_ids",
					"usage_limit",
					"once_per_customer",
					"used_count",
					"starts_at",
					"ends_at",
					"created_at",
					"updated_at"
				]
			},
			"DiscountValue": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"enum": ["percent", "fixed"]
					},
					"value": {
						"type": "number",
						"description": "A percent (15 is 15%), or minor units of the store currency for fixed"
					}
				},
				"required": ["type", "value"]
			},
			"DiscountTargets": {
				"type": "object",
				"properties": {
					"kind": {
						"type": "string",
						"enum": ["all", "collections", "products"]
					},
					"ids": {
						"type": "array",
						"items": {
							"type": "string",
							"format": "uuid"
						}
					}
				},
				"required": ["kind", "ids"]
			},
			"Event": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"description": "Increasing. Pass the last one you saw as `after`"
					},
					"type": {
						"type": "string",
						"enum": [
							"order.created",
							"order.paid",
							"order.shipped",
							"order.delivered",
							"order.cancelled",
							"order.refunded",
							"order.edited",
							"refund.created",
							"return.requested",
							"return.opened",
							"return.received",
							"return.closed",
							"checkout.started",
							"checkout.abandoned",
							"checkout.recovered",
							"checkout.converted",
							"customer.first_order",
							"product.created",
							"product.updated",
							"product.low_stock",
							"product.out_of_stock"
						]
					},
					"subject_type": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"subject_id": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "null"
							}
						]
					},
					"created_at": {
						"type": "string",
						"format": "date-time"
					},
					"data": {
						"type": "object",
						"description": "order.*: { order, customer } (order.refunded adds refund, order.edited adds edit). refund.created: { order, customer, refund }. return.*: { order, customer, return }. customer.first_order: { order, customer }. checkout.*: { checkout, customer } (checkout.converted adds order). product.created and product.updated: { product, changes }. product.low_stock and product.out_of_stock: { product, variant, threshold }."
					}
				},
				"required": ["id", "type", "subject_type", "subject_id", "created_at", "data"]
			},
			"Webhook": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"format": "uuid"
					},
					"url": {
						"type": "string"
					},
					"events": {
						"type": "array",
						"items": {
							"type": "string"
						}
					},
					"description": {
						"type": "string"
					},
					"active": {
						"type": "boolean"
					},
					"failing_since": {
						"anyOf": [
							{
								"type": "string",
								"description": "Deliveries have failed since then. After 3 days the webhook turns off",
								"format": "date-time"
							},
							{
								"type": "null"
							}
						]
					},
					"created_at": {
						"type": "string",
						"format": "date-time"
					},
					"updated_at": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": ["id", "url", "events", "description", "active", "failing_since", "created_at", "updated_at"]
			},
			"Delivery": {
				"type": "object",
				"properties": {
					"id": {
						"type": "integer"
					},
					"event_id": {
						"type": "string"
					},
					"event_type": {
						"type": "string"
					},
					"test": {
						"type": "boolean"
					},
					"status": {
						"type": "string",
						"enum": ["pending", "sent", "failed"]
					},
					"attempts": {
						"type": "integer"
					},
					"response_status": {
						"anyOf": [
							{
								"type": "integer"
							},
							{
								"type": "null"
							}
						]
					},
					"response_body": {
						"anyOf": [
							{
								"type": "string",
								"description": "The first 2000 characters"
							},
							{
								"type": "null"
							}
						]
					},
					"duration_ms": {
						"anyOf": [
							{
								"type": "integer"
							},
							{
								"type": "null"
							}
						]
					},
					"next_attempt_at": {
						"anyOf": [
							{
								"type": "string",
								"format": "date-time"
							},
							{
								"type": "null"
							}
						]
					},
					"created_at": {
						"type": "string",
						"format": "date-time"
					},
					"sent_at": {
						"anyOf": [
							{
								"type": "string",
								"format": "date-time"
							},
							{
								"type": "null"
							}
						]
					}
				},
				"required": [
					"id",
					"event_id",
					"event_type",
					"test",
					"status",
					"attempts",
					"response_status",
					"response_body",
					"duration_ms",
					"next_attempt_at",
					"created_at",
					"sent_at"
				]
			},
			"WebhookEvent": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"description": "The event id, the same as in /events. The same across retries and for every webhook that gets it"
					},
					"type": {
						"type": "string",
						"description": "The event type. webhook.test only on a test without a sample",
						"enum": [
							"order.created",
							"order.paid",
							"order.shipped",
							"order.delivered",
							"order.cancelled",
							"order.refunded",
							"order.edited",
							"refund.created",
							"return.requested",
							"return.opened",
							"return.received",
							"return.closed",
							"checkout.started",
							"checkout.abandoned",
							"checkout.recovered",
							"checkout.converted",
							"customer.first_order",
							"product.created",
							"product.updated",
							"product.low_stock",
							"product.out_of_stock",
							"webhook.test"
						]
					},
					"created_at": {
						"type": "string",
						"description": "When the event happened",
						"format": "date-time"
					},
					"store": {
						"type": "object",
						"properties": {
							"id": {
								"type": "string",
								"format": "uuid"
							},
							"name": {
								"type": "string"
							},
							"slug": {
								"type": "string"
							}
						},
						"required": ["id", "name", "slug"]
					},
					"test": {
						"type": "boolean",
						"const": true,
						"description": "Only on test deliveries"
					},
					"data": {
						"type": "object",
						"description": "The payload, as `data` on the event in /events. Its fields depend on the type"
					}
				},
				"required": ["id", "type", "created_at", "store", "data"]
			},
			"Pagination": {
				"type": "object",
				"properties": {
					"page": {
						"type": "integer"
					},
					"limit": {
						"type": "integer"
					},
					"total": {
						"type": "integer"
					},
					"has_more": {
						"type": "boolean"
					}
				},
				"required": ["page", "limit", "total", "has_more"]
			},
			"Error": {
				"type": "object",
				"properties": {
					"error": {
						"type": "object",
						"properties": {
							"code": {
								"type": "string"
							},
							"message": {
								"type": "string"
							}
						},
						"required": ["code"]
					}
				},
				"required": ["error"]
			}
		}
	},
	"x-webhook-events": {
		"order.created": "A customer placed an order or one was added by hand.",
		"order.paid": "Payment for an order came in.",
		"order.shipped": "An order left the warehouse, with its tracking number if there is one.",
		"order.delivered": "An order reached the customer.",
		"order.cancelled": "An order was cancelled.",
		"order.refunded": "An order was refunded in full.",
		"order.edited": "Items were added to, removed from or changed on an order after it was placed.",
		"refund.created": "Money went back to a customer for all or part of an order, to the card or as store credit.",
		"return.requested": "A customer asked to return items from their account.",
		"return.opened": "Staff opened a return, or approved one a customer asked for.",
		"return.received": "The returned items arrived back.",
		"return.closed": "A return was closed or declined.",
		"checkout.started": "Someone typed their contact details at checkout.",
		"checkout.abandoned": "Someone left checkout with contact details and items, and did not come back within the store's waiting time.",
		"checkout.recovered": "Someone came back through a recovery link.",
		"checkout.converted": "A checkout became an order.",
		"customer.first_order": "Someone ordered from the store for the first time.",
		"product.created": "A product was added to the store.",
		"product.updated": "A product's details, price or stock changed.",
		"product.low_stock": "A version of a product fell to the store's low stock level (3 unless changed in Settings, Notifications).",
		"product.out_of_stock": "A version of a product sold out."
	}
}
