{
    "openapi": "3.1.0",
    "info": {
        "title": "GroKeeper API",
        "version": "1.0.97",
        "description": "JSON API for a GroKeeper store: products, sizes, stock, orders and contacts. Authenticate with an API key created in the admin (API & webhooks > API keys): send it as \"Authorization: Bearer KEY\" or in the \"X-Api-Key\" header. Each key has scopes; a missing scope gives 403. Money is in whole units of the store's currency. There are no checkout, cart, payment, refund or coupon endpoints. This describes API v1 as released with platform version 1.0.97. Within v1 fields, events and calls are only ever added, never renamed or removed. The server address in this file is an example: use the address of your own store followed by /api/v1.",
        "x-api-version": "v1",
        "x-platform-version": "1.0.97"
    },
    "servers": [
        {
            "url": "https://yourstore.example.com/api/v1",
            "description": "Your store's own address (an example here): replace it with the web address of the store you connect to."
        }
    ],
    "tags": [
        {
            "name": "Categories"
        },
        {
            "name": "Products"
        },
        {
            "name": "Sizes (variants)"
        },
        {
            "name": "Inventory"
        },
        {
            "name": "Orders"
        },
        {
            "name": "Customers"
        }
    ],
    "paths": {
        "/categories": {
            "get": {
                "operationId": "listCategories",
                "summary": "List categories",
                "description": "All product categories, with how many products each holds. General is the protected default category. Required scope: read:categories.",
                "tags": [
                    "Categories"
                ],
                "x-required-scope": "read:categories",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Category"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        },
                                        "links": {
                                            "$ref": "#/components/schemas/Links"
                                        }
                                    }
                                },
                                "example": {
                                    "data": [
                                        {
                                            "id": 3,
                                            "name": "Sample Category",
                                            "slug": "sample-category",
                                            "sort": 1,
                                            "archived": false,
                                            "general": false,
                                            "products_count": 12,
                                            "created_at": "2026-10-01T09:00:00Z",
                                            "updated_at": "2026-10-01T09:00:00Z"
                                        }
                                    ],
                                    "meta": {
                                        "page": 1,
                                        "per_page": 25,
                                        "total": 1,
                                        "last_page": 1
                                    },
                                    "links": {
                                        "first": "https://yourstore.example.com/api/v1/categories?page=1",
                                        "last": "https://yourstore.example.com/api/v1/categories?page=1",
                                        "prev": null,
                                        "next": null
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope read:categories, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "archived",
                        "in": "query",
                        "required": false,
                        "description": "true: only archived categories; false: only active ones. Left out: both.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Rows per page, 1 to 100 (default 25). per_page works too.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "description": "Only rows changed at or after this time (ISO 8601, for example 2026-11-21T10:00:00Z, or a date).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/categories/{id}": {
            "get": {
                "operationId": "getCategory",
                "summary": "Get a category",
                "description": "One category by id. Required scope: read:categories.",
                "tags": [
                    "Categories"
                ],
                "x-required-scope": "read:categories",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Category"
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "id": 3,
                                        "name": "Sample Category",
                                        "slug": "sample-category",
                                        "sort": 1,
                                        "archived": false,
                                        "general": false,
                                        "products_count": 12,
                                        "created_at": "2026-10-01T09:00:00Z",
                                        "updated_at": "2026-10-01T09:00:00Z"
                                    },
                                    "meta": {}
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope read:categories, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "The resource id."
                    }
                ]
            }
        },
        "/products": {
            "get": {
                "operationId": "listProducts",
                "summary": "List products",
                "description": "Products with their sizes (variants), prices and stock, in id order. Drafts and archived products are included (see the active field, or use expand=full for status). The default answer is exactly the one this API has always given; expand=full adds fields. Required scope: read:products.",
                "tags": [
                    "Products"
                ],
                "x-required-scope": "read:products",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Product"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        },
                                        "links": {
                                            "$ref": "#/components/schemas/Links"
                                        }
                                    }
                                },
                                "example": {
                                    "data": [
                                        {
                                            "id": 7,
                                            "sku": "SAMPLE-001",
                                            "name": "Sample Product",
                                            "slug": "sample-product",
                                            "active": false,
                                            "category": "Sample Category",
                                            "url": "https://example.com/product/sample-product",
                                            "short": "A short description of the product.",
                                            "images": [
                                                "https://example.com/img/products/sample-product.jpg"
                                            ],
                                            "variants": [
                                                {
                                                    "id": 31,
                                                    "label": "250 g",
                                                    "price": 399,
                                                    "mrp": 449,
                                                    "stock": 120
                                                },
                                                {
                                                    "id": 32,
                                                    "label": "500 g",
                                                    "price": 749,
                                                    "mrp": 849,
                                                    "stock": 60
                                                }
                                            ]
                                        }
                                    ],
                                    "meta": {
                                        "page": 1,
                                        "per_page": 25,
                                        "total": 1,
                                        "last_page": 1
                                    },
                                    "links": {
                                        "first": "https://yourstore.example.com/api/v1/products?page=1",
                                        "last": "https://yourstore.example.com/api/v1/products?page=1",
                                        "prev": null,
                                        "next": null
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope read:products, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "sku",
                        "in": "query",
                        "required": false,
                        "description": "Only the product with this SKU.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "published, draft or archived.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "published",
                                "draft",
                                "archived"
                            ]
                        }
                    },
                    {
                        "name": "category_id",
                        "in": "query",
                        "required": false,
                        "description": "Only products in this category.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "expand",
                        "in": "query",
                        "required": false,
                        "description": "full: add status, category_id, hsn, gst_rate, sort, created_at, updated_at and description.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "full"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Rows per page, 1 to 100 (default 25). per_page works too.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "description": "Only rows changed at or after this time (ISO 8601, for example 2026-11-21T10:00:00Z, or a date).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            },
            "post": {
                "operationId": "createProduct",
                "summary": "Create a product",
                "description": "Creates a product as a DRAFT, the same as the product import does. Send published: true to publish it at once: that only works when the product passes the import's checks (valid HSN, no duplicate size, a price above zero and a price not above the MRP). Stock cannot be sent: new sizes start at 0 and are filled with POST /inventory/adjustments. Required scope: write:products.",
                "tags": [
                    "Products"
                ],
                "x-required-scope": "write:products",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ProductFull"
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "id": 7,
                                        "sku": "SAMPLE-001",
                                        "name": "Sample Product",
                                        "slug": "sample-product",
                                        "active": false,
                                        "category": "Sample Category",
                                        "url": "https://example.com/product/sample-product",
                                        "short": "A short description of the product.",
                                        "images": [
                                            "https://example.com/img/products/sample-product.jpg"
                                        ],
                                        "variants": [
                                            {
                                                "id": 31,
                                                "label": "250 g",
                                                "price": 399,
                                                "mrp": 449,
                                                "stock": 120
                                            },
                                            {
                                                "id": 32,
                                                "label": "500 g",
                                                "price": 749,
                                                "mrp": 849,
                                                "stock": 60
                                            }
                                        ],
                                        "status": "draft",
                                        "category_id": 3,
                                        "hsn": "01234567",
                                        "gst_rate": 5,
                                        "sort": 10,
                                        "created_at": "2026-11-01T09:00:00Z",
                                        "updated_at": "2026-11-21T10:00:00Z",
                                        "description": "A longer description of the product."
                                    },
                                    "meta": {}
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope write:products, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The request was refused: see error.fields.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "The Idempotency-Key was reused for a different request, or the change conflicts with the current state.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "A unique value (up to 100 characters) for this request. Repeating the request with the same key returns the stored answer instead of doing it twice (kept 24 hours).",
                        "schema": {
                            "type": "string",
                            "maxLength": 100
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Product name.",
                                        "maxLength": 190,
                                        "example": "Sample Product"
                                    },
                                    "sku": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Product SKU (unique).",
                                        "maxLength": 100,
                                        "example": "SAMPLE-001"
                                    },
                                    "slug": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Web address part. Made from the name when left out; a number is added if it is taken.",
                                        "maxLength": 190,
                                        "example": "sample-product"
                                    },
                                    "category_id": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "description": "Category id (see GET /categories). Left out: the General category. An archived category is refused.",
                                        "example": 3
                                    },
                                    "short": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Short description.",
                                        "maxLength": 2000,
                                        "example": "A short description of the product."
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Description. Blank lines make paragraphs; HTML is cleaned.",
                                        "maxLength": 20000,
                                        "example": "A longer description of the product."
                                    },
                                    "hsn": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "HSN code for GST invoices: exactly 4, 6 or 8 digits. A 7-digit code is refused (a leading zero was probably lost): send 01234567, not 1234567.",
                                        "maxLength": 8,
                                        "example": "01234567"
                                    },
                                    "gst_rate": {
                                        "type": [
                                            "number",
                                            "null"
                                        ],
                                        "description": "GST rate in percent (for example 5 or 18). Left empty: the store default applies.",
                                        "maximum": 40,
                                        "minimum": 0,
                                        "example": 5
                                    },
                                    "sort": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "description": "Position in lists (lower first).",
                                        "maximum": 100000,
                                        "minimum": 0,
                                        "example": 10
                                    },
                                    "published": {
                                        "type": "boolean",
                                        "description": "false (default): create as a draft. true: publish now (only if the product is complete).",
                                        "example": false
                                    },
                                    "variants": {
                                        "type": "array",
                                        "description": "The sizes (at least one). Each: label, price, mrp, sku, weight_grams.",
                                        "maxItems": 50,
                                        "minItems": 1,
                                        "items": {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "properties": {
                                                "label": {
                                                    "type": "string",
                                                    "description": "Size label, for example \"250 g\".",
                                                    "maxLength": 100,
                                                    "example": "250 g"
                                                },
                                                "price": {
                                                    "type": "integer",
                                                    "description": "Selling price in whole units of the store's currency.",
                                                    "minimum": 0,
                                                    "example": 399
                                                },
                                                "mrp": {
                                                    "type": "integer",
                                                    "description": "MRP (the printed maximum price) in whole units of the store's currency.",
                                                    "minimum": 0,
                                                    "example": 449
                                                },
                                                "sku": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "SKU of this size (unique). Used by POST /inventory/adjustments.",
                                                    "maxLength": 100,
                                                    "example": "SAMPLE-001-250"
                                                },
                                                "weight_grams": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Shipping weight in grams.",
                                                    "maximum": 1000000,
                                                    "minimum": 0,
                                                    "example": 250
                                                }
                                            },
                                            "required": [
                                                "label",
                                                "price",
                                                "mrp"
                                            ]
                                        },
                                        "example": [
                                            {
                                                "label": "250 g",
                                                "price": 399,
                                                "mrp": 449,
                                                "sku": "SAMPLE-001-250",
                                                "weight_grams": 250
                                            }
                                        ]
                                    }
                                },
                                "required": [
                                    "name",
                                    "variants"
                                ]
                            },
                            "example": {
                                "name": "Sample Product",
                                "sku": "SAMPLE-001",
                                "category_id": 3,
                                "hsn": "01234567",
                                "gst_rate": 5,
                                "short": "A short description of the product.",
                                "variants": [
                                    {
                                        "label": "250 g",
                                        "price": 399,
                                        "mrp": 449,
                                        "sku": "SAMPLE-001-250",
                                        "weight_grams": 250
                                    }
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/products/{id}": {
            "get": {
                "operationId": "getProduct",
                "summary": "Get a product",
                "description": "One product by id. Add expand=full for the extra fields (status, category_id, hsn, gst_rate, sort, dates and the description text). Required scope: read:products.",
                "tags": [
                    "Products"
                ],
                "x-required-scope": "read:products",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Product"
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "id": 7,
                                        "sku": "SAMPLE-001",
                                        "name": "Sample Product",
                                        "slug": "sample-product",
                                        "active": false,
                                        "category": "Sample Category",
                                        "url": "https://example.com/product/sample-product",
                                        "short": "A short description of the product.",
                                        "images": [
                                            "https://example.com/img/products/sample-product.jpg"
                                        ],
                                        "variants": [
                                            {
                                                "id": 31,
                                                "label": "250 g",
                                                "price": 399,
                                                "mrp": 449,
                                                "stock": 120
                                            },
                                            {
                                                "id": 32,
                                                "label": "500 g",
                                                "price": 749,
                                                "mrp": 849,
                                                "stock": 60
                                            }
                                        ]
                                    },
                                    "meta": {}
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope read:products, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "The resource id."
                    },
                    {
                        "name": "expand",
                        "in": "query",
                        "required": false,
                        "description": "full: add status, category_id, hsn, gst_rate, sort, created_at, updated_at and description.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "full"
                            ]
                        }
                    }
                ]
            },
            "patch": {
                "operationId": "updateProduct",
                "summary": "Update a product",
                "description": "Changes only the fields you send. active: true publishes the product (an archived product cannot be published; weight is set on each size, see the variants endpoints). Stock and the payment or order amounts are never accepted here. Required scope: write:products.",
                "tags": [
                    "Products"
                ],
                "x-required-scope": "write:products",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ProductFull"
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "id": 7,
                                        "sku": "SAMPLE-001",
                                        "name": "Sample Product",
                                        "slug": "sample-product",
                                        "active": false,
                                        "category": "Sample Category",
                                        "url": "https://example.com/product/sample-product",
                                        "short": "A short description of the product.",
                                        "images": [
                                            "https://example.com/img/products/sample-product.jpg"
                                        ],
                                        "variants": [
                                            {
                                                "id": 31,
                                                "label": "250 g",
                                                "price": 399,
                                                "mrp": 449,
                                                "stock": 120
                                            },
                                            {
                                                "id": 32,
                                                "label": "500 g",
                                                "price": 749,
                                                "mrp": 849,
                                                "stock": 60
                                            }
                                        ],
                                        "status": "draft",
                                        "category_id": 3,
                                        "hsn": "01234567",
                                        "gst_rate": 5,
                                        "sort": 10,
                                        "created_at": "2026-11-01T09:00:00Z",
                                        "updated_at": "2026-11-21T10:00:00Z",
                                        "description": "A longer description of the product."
                                    },
                                    "meta": {}
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope write:products, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The request was refused: see error.fields.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "The Idempotency-Key was reused for a different request, or the change conflicts with the current state.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "The resource id."
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "A unique value (up to 100 characters) for this request. Repeating the request with the same key returns the stored answer instead of doing it twice (kept 24 hours).",
                        "schema": {
                            "type": "string",
                            "maxLength": 100
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Product name.",
                                        "maxLength": 190,
                                        "example": "Sample Product"
                                    },
                                    "category_id": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "description": "Category id (see GET /categories). Left out: the General category. An archived category is refused.",
                                        "example": 3
                                    },
                                    "short": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Short description.",
                                        "maxLength": 2000,
                                        "example": "A short description of the product."
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Description. Blank lines make paragraphs; HTML is cleaned.",
                                        "maxLength": 20000,
                                        "example": "A longer description of the product."
                                    },
                                    "hsn": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "HSN code for GST invoices: exactly 4, 6 or 8 digits. A 7-digit code is refused (a leading zero was probably lost): send 01234567, not 1234567.",
                                        "maxLength": 8,
                                        "example": "01234567"
                                    },
                                    "gst_rate": {
                                        "type": [
                                            "number",
                                            "null"
                                        ],
                                        "description": "GST rate in percent (for example 5 or 18). Left empty: the store default applies.",
                                        "maximum": 40,
                                        "minimum": 0,
                                        "example": 5
                                    },
                                    "sort": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "description": "Position in lists (lower first).",
                                        "maximum": 100000,
                                        "minimum": 0,
                                        "example": 10
                                    },
                                    "active": {
                                        "type": "boolean",
                                        "description": "true: publish. false: set back to draft.",
                                        "example": true
                                    }
                                }
                            },
                            "example": {
                                "gst_rate": 5,
                                "hsn": "01234567",
                                "active": true
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "archiveProduct",
                "summary": "Archive a product",
                "description": "Archives the product: it disappears from the shop but stays in the admin and on old orders, and can be restored there. Nothing is ever deleted through the API. Required scope: write:products.",
                "tags": [
                    "Products"
                ],
                "x-required-scope": "write:products",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ProductFull"
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "id": 7,
                                        "sku": "SAMPLE-001",
                                        "name": "Sample Product",
                                        "slug": "sample-product",
                                        "active": false,
                                        "category": "Sample Category",
                                        "url": "https://example.com/product/sample-product",
                                        "short": "A short description of the product.",
                                        "images": [
                                            "https://example.com/img/products/sample-product.jpg"
                                        ],
                                        "variants": [
                                            {
                                                "id": 31,
                                                "label": "250 g",
                                                "price": 399,
                                                "mrp": 449,
                                                "stock": 120
                                            },
                                            {
                                                "id": 32,
                                                "label": "500 g",
                                                "price": 749,
                                                "mrp": 849,
                                                "stock": 60
                                            }
                                        ],
                                        "status": "draft",
                                        "category_id": 3,
                                        "hsn": "01234567",
                                        "gst_rate": 5,
                                        "sort": 10,
                                        "created_at": "2026-11-01T09:00:00Z",
                                        "updated_at": "2026-11-21T10:00:00Z",
                                        "description": "A longer description of the product."
                                    },
                                    "meta": {}
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope write:products, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "The resource id."
                    }
                ]
            }
        },
        "/products/{id}/variants": {
            "get": {
                "operationId": "listVariants",
                "summary": "List the sizes of a product",
                "description": "Every size of the product with price, MRP, SKU, weight and the current stock (read only). Required scope: read:products.",
                "tags": [
                    "Sizes (variants)"
                ],
                "x-required-scope": "read:products",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Variant"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                },
                                "example": {
                                    "data": [
                                        {
                                            "id": 31,
                                            "product_id": 7,
                                            "sku": "SAMPLE-001-250",
                                            "label": "250 g",
                                            "price": 399,
                                            "mrp": 449,
                                            "weight_grams": 250,
                                            "sort": 0,
                                            "stock": 120,
                                            "created_at": "2026-11-01T09:00:00Z",
                                            "updated_at": "2026-11-21T10:00:00Z"
                                        }
                                    ],
                                    "meta": {}
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope read:products, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "The resource id."
                    }
                ]
            },
            "post": {
                "operationId": "createVariant",
                "summary": "Add a size",
                "description": "Adds a size to a product. It starts with 0 in stock: use POST /inventory/adjustments to add stock. Required scope: write:products.",
                "tags": [
                    "Sizes (variants)"
                ],
                "x-required-scope": "write:products",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Variant"
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "id": 31,
                                        "product_id": 7,
                                        "sku": "SAMPLE-001-250",
                                        "label": "250 g",
                                        "price": 399,
                                        "mrp": 449,
                                        "weight_grams": 250,
                                        "sort": 0,
                                        "stock": 120,
                                        "created_at": "2026-11-01T09:00:00Z",
                                        "updated_at": "2026-11-21T10:00:00Z"
                                    },
                                    "meta": {}
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope write:products, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The request was refused: see error.fields.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "The Idempotency-Key was reused for a different request, or the change conflicts with the current state.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "The resource id."
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "A unique value (up to 100 characters) for this request. Repeating the request with the same key returns the stored answer instead of doing it twice (kept 24 hours).",
                        "schema": {
                            "type": "string",
                            "maxLength": 100
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "Size label, for example \"250 g\".",
                                        "maxLength": 100,
                                        "example": "250 g"
                                    },
                                    "price": {
                                        "type": "integer",
                                        "description": "Selling price in whole units of the store's currency.",
                                        "minimum": 0,
                                        "example": 399
                                    },
                                    "mrp": {
                                        "type": "integer",
                                        "description": "MRP (the printed maximum price) in whole units of the store's currency.",
                                        "minimum": 0,
                                        "example": 449
                                    },
                                    "sku": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "SKU of this size (unique). Used by POST /inventory/adjustments.",
                                        "maxLength": 100,
                                        "example": "SAMPLE-001-250"
                                    },
                                    "weight_grams": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "description": "Shipping weight in grams.",
                                        "maximum": 1000000,
                                        "minimum": 0,
                                        "example": 250
                                    }
                                },
                                "required": [
                                    "label",
                                    "price",
                                    "mrp"
                                ]
                            },
                            "example": {
                                "label": "500 g",
                                "price": 749,
                                "mrp": 849,
                                "sku": "SAMPLE-001-500",
                                "weight_grams": 500
                            }
                        }
                    }
                }
            }
        },
        "/products/{id}/variants/{variantId}": {
            "patch": {
                "operationId": "updateVariant",
                "summary": "Update a size",
                "description": "Changes label, price, MRP, SKU or weight of one size. Stock is not accepted here. A size cannot be deleted through the API. Required scope: write:products.",
                "tags": [
                    "Sizes (variants)"
                ],
                "x-required-scope": "write:products",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Variant"
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "id": 31,
                                        "product_id": 7,
                                        "sku": "SAMPLE-001-250",
                                        "label": "250 g",
                                        "price": 399,
                                        "mrp": 449,
                                        "weight_grams": 250,
                                        "sort": 0,
                                        "stock": 120,
                                        "created_at": "2026-11-01T09:00:00Z",
                                        "updated_at": "2026-11-21T10:00:00Z"
                                    },
                                    "meta": {}
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope write:products, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The request was refused: see error.fields.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "The Idempotency-Key was reused for a different request, or the change conflicts with the current state.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "The resource id."
                    },
                    {
                        "name": "variantId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "The size id."
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "A unique value (up to 100 characters) for this request. Repeating the request with the same key returns the stored answer instead of doing it twice (kept 24 hours).",
                        "schema": {
                            "type": "string",
                            "maxLength": 100
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "Size label, for example \"250 g\".",
                                        "maxLength": 100,
                                        "example": "250 g"
                                    },
                                    "price": {
                                        "type": "integer",
                                        "description": "Selling price in whole units of the store's currency.",
                                        "minimum": 0,
                                        "example": 399
                                    },
                                    "mrp": {
                                        "type": "integer",
                                        "description": "MRP (the printed maximum price) in whole units of the store's currency.",
                                        "minimum": 0,
                                        "example": 449
                                    },
                                    "sku": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "SKU of this size (unique). Used by POST /inventory/adjustments.",
                                        "maxLength": 100,
                                        "example": "SAMPLE-001-250"
                                    },
                                    "weight_grams": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "description": "Shipping weight in grams.",
                                        "maximum": 1000000,
                                        "minimum": 0,
                                        "example": 250
                                    }
                                }
                            },
                            "example": {
                                "price": 389,
                                "mrp": 449
                            }
                        }
                    }
                }
            }
        },
        "/inventory": {
            "get": {
                "operationId": "listInventory",
                "summary": "List stock levels",
                "description": "One row per size: on_hand, reserved, available (what the shop sells from), reorder_level and a status (in_stock, low, out). Required scope: read:inventory.",
                "tags": [
                    "Inventory"
                ],
                "x-required-scope": "read:inventory",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/InventoryRow"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        },
                                        "links": {
                                            "$ref": "#/components/schemas/Links"
                                        }
                                    }
                                },
                                "example": {
                                    "data": [
                                        {
                                            "variant_id": 31,
                                            "product_id": 7,
                                            "product": "Sample Product",
                                            "size": "250 g",
                                            "sku": "SAMPLE-001-250",
                                            "on_hand": 8,
                                            "reserved": 0,
                                            "available": 8,
                                            "reorder_level": 10,
                                            "status": "low",
                                            "counted_at": "2026-11-01T09:00:00Z",
                                            "updated_at": "2026-11-21T10:00:00Z"
                                        }
                                    ],
                                    "meta": {
                                        "page": 1,
                                        "per_page": 25,
                                        "total": 1,
                                        "last_page": 1
                                    },
                                    "links": {
                                        "first": "https://yourstore.example.com/api/v1/inventory?page=1",
                                        "last": "https://yourstore.example.com/api/v1/inventory?page=1",
                                        "prev": null,
                                        "next": null
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope read:inventory, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "product_id",
                        "in": "query",
                        "required": false,
                        "description": "Only the sizes of this product.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "variant_id",
                        "in": "query",
                        "required": false,
                        "description": "Only this size.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "sku",
                        "in": "query",
                        "required": false,
                        "description": "The SKU of a size (or of a product that has one size).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "in_stock, low or out.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "in_stock",
                                "low",
                                "out"
                            ]
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "description": "Words in the product name, SKU or size.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Rows per page, 1 to 100 (default 25). per_page works too.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "description": "Only rows changed at or after this time (ISO 8601, for example 2026-11-21T10:00:00Z, or a date).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/inventory/movements": {
            "get": {
                "operationId": "listMovements",
                "summary": "List stock history",
                "description": "The permanent stock history, newest first: every change with its reason, the balance after it and where it came from. Required scope: read:inventory.",
                "tags": [
                    "Inventory"
                ],
                "x-required-scope": "read:inventory",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Movement"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        },
                                        "links": {
                                            "$ref": "#/components/schemas/Links"
                                        }
                                    }
                                },
                                "example": {
                                    "data": [
                                        {
                                            "id": 9012,
                                            "variant_id": 31,
                                            "product_id": 7,
                                            "sku": "SAMPLE-001-250",
                                            "reason": "adjustment_add",
                                            "reason_label": "Stock added",
                                            "change": 24,
                                            "balance_after": 32,
                                            "reference": {
                                                "type": "api_key",
                                                "id": 2
                                            },
                                            "note": "Received: Delivery from the supplier",
                                            "by": "api_key",
                                            "created_at": "2026-11-21T10:00:00Z"
                                        }
                                    ],
                                    "meta": {
                                        "page": 1,
                                        "per_page": 25,
                                        "total": 1,
                                        "last_page": 1
                                    },
                                    "links": {
                                        "first": "https://yourstore.example.com/api/v1/inventory/movements?page=1",
                                        "last": "https://yourstore.example.com/api/v1/inventory/movements?page=1",
                                        "prev": null,
                                        "next": null
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope read:inventory, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "product_id",
                        "in": "query",
                        "required": false,
                        "description": "Only this product.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "variant_id",
                        "in": "query",
                        "required": false,
                        "description": "Only this size.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "sku",
                        "in": "query",
                        "required": false,
                        "description": "The SKU of a size.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "reason",
                        "in": "query",
                        "required": false,
                        "description": "A reason code, for example sale, damaged, adjustment_add.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "opening",
                                "sale",
                                "order_cancelled",
                                "payment_failed_restock",
                                "return",
                                "return_restock",
                                "return_writeoff",
                                "adjustment_add",
                                "adjustment_remove",
                                "damaged",
                                "expired",
                                "found",
                                "count_correction",
                                "import",
                                "manual_edit",
                                "transfer_out",
                                "transfer_in",
                                "admin_reinstate",
                                "late_payment_oversold",
                                "resync"
                            ]
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "From this date (YYYY-MM-DD).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Up to this date (YYYY-MM-DD).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Rows per page, 1 to 100 (default 25). per_page works too.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ]
            }
        },
        "/inventory/adjustments": {
            "post": {
                "operationId": "adjustStock",
                "summary": "Add, remove or set stock",
                "description": "The only way to change stock through the API. The same rules as the Adjust box on the Inventory page: a reason from the same list is required, you cannot remove more than is available, and \"set\" means a counted number (reason correction or other). It is recorded in the stock history with this key as the author. Send expected to refuse the change if the stock is not what you last saw. Returns the movement and the new stock row. Required scope: write:inventory.",
                "tags": [
                    "Inventory"
                ],
                "x-required-scope": "write:inventory",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Adjustment"
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "movement_id": 9012,
                                        "variant_id": 31,
                                        "mode": "add",
                                        "before": 8,
                                        "after": 32,
                                        "change": 24,
                                        "inventory": {
                                            "variant_id": 31,
                                            "product_id": 7,
                                            "product": "Sample Product",
                                            "size": "250 g",
                                            "sku": "SAMPLE-001-250",
                                            "on_hand": 32,
                                            "reserved": 0,
                                            "available": 32,
                                            "reorder_level": 10,
                                            "status": "in_stock",
                                            "counted_at": "2026-11-01T09:00:00Z",
                                            "updated_at": "2026-11-21T10:00:00Z"
                                        }
                                    },
                                    "meta": {}
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope write:inventory, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The request was refused: see error.fields.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "The Idempotency-Key was reused for a different request, or the change conflicts with the current state.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "A unique value (up to 100 characters) for this request. Repeating the request with the same key returns the stored answer instead of doing it twice (kept 24 hours).",
                        "schema": {
                            "type": "string",
                            "maxLength": 100
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                    "variant_id": {
                                        "type": "integer",
                                        "description": "The size to change. Send this or sku.",
                                        "example": 31
                                    },
                                    "sku": {
                                        "type": "string",
                                        "description": "The SKU of the size (or of a product that has exactly one size). Send this or variant_id.",
                                        "maxLength": 100,
                                        "example": "SAMPLE-001-250"
                                    },
                                    "mode": {
                                        "type": "string",
                                        "description": "add or remove: change by quantity. set: make the stock exactly quantity (a counted number).",
                                        "enum": [
                                            "add",
                                            "remove",
                                            "set"
                                        ],
                                        "example": "add"
                                    },
                                    "quantity": {
                                        "type": "integer",
                                        "description": "Units to add or remove (1 or more), or the counted number for set.",
                                        "maximum": 1000000,
                                        "minimum": 0,
                                        "example": 24
                                    },
                                    "reason": {
                                        "type": "string",
                                        "description": "received or found (add only), damaged or expired (remove only), correction or other (any; set needs one of these). other needs a note.",
                                        "enum": [
                                            "received",
                                            "found",
                                            "damaged",
                                            "expired",
                                            "correction",
                                            "other"
                                        ],
                                        "example": "received"
                                    },
                                    "note": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "A note for the stock history (required when the reason is other).",
                                        "maxLength": 500,
                                        "example": "Delivery from the supplier, invoice 4471"
                                    },
                                    "expected": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "description": "The available stock you last saw. If it has changed, nothing is changed and you get 409.",
                                        "minimum": 0,
                                        "example": 96
                                    }
                                },
                                "required": [
                                    "mode",
                                    "quantity",
                                    "reason"
                                ]
                            },
                            "example": {
                                "sku": "SAMPLE-001-250",
                                "mode": "add",
                                "quantity": 24,
                                "reason": "received",
                                "note": "Delivery from the supplier, invoice 4471"
                            }
                        }
                    }
                }
            }
        },
        "/orders": {
            "get": {
                "operationId": "listOrders",
                "summary": "List orders",
                "description": "Orders, newest first, with items, customer contact details and delivery address. Each order carries a read-only source (where it came from: website, phone, whatsapp, counter, marketplace or other). Otherwise the default answer is the one this API has always given; expand=full adds tracking_url, cancel_reason, refund_status, refunded_amount, updated_at, gift, gift_message and packaging. Required scope: read:orders.",
                "tags": [
                    "Orders"
                ],
                "x-required-scope": "read:orders",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Order"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        },
                                        "links": {
                                            "$ref": "#/components/schemas/Links"
                                        }
                                    }
                                },
                                "example": {
                                    "data": [
                                        {
                                            "id": 1024,
                                            "number": "GK-261008-7WNM",
                                            "status": "placed",
                                            "payment_method": "cod",
                                            "payment_status": "pending",
                                            "subtotal": 1197,
                                            "discount": 100,
                                            "shipping": 60,
                                            "total": 1217,
                                            "coupon": "WELCOME10",
                                            "customer": {
                                                "name": "Sample Customer",
                                                "email": "buyer@example.com",
                                                "phone": "9000000000"
                                            },
                                            "address": {
                                                "line1": "12 Sample Street",
                                                "line2": null,
                                                "city": "Sample City",
                                                "state": "Sample State",
                                                "pincode": "123456"
                                            },
                                            "courier": null,
                                            "awb": null,
                                            "items": [
                                                {
                                                    "product_id": 7,
                                                    "name": "Sample Product",
                                                    "variant": "250 g",
                                                    "price": 399,
                                                    "qty": 3
                                                }
                                            ],
                                            "created_at": "2026-11-21T10:15:00+00:00",
                                            "source": "website"
                                        }
                                    ],
                                    "meta": {
                                        "page": 1,
                                        "per_page": 25,
                                        "total": 1,
                                        "last_page": 1
                                    },
                                    "links": {
                                        "first": "https://yourstore.example.com/api/v1/orders?page=1",
                                        "last": "https://yourstore.example.com/api/v1/orders?page=1",
                                        "prev": null,
                                        "next": null
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope read:orders, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "placed, packed, shipped, out_for_delivery, delivered or cancelled.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "placed",
                                "packed",
                                "shipped",
                                "out_for_delivery",
                                "delivered",
                                "cancelled"
                            ]
                        }
                    },
                    {
                        "name": "payment_status",
                        "in": "query",
                        "required": false,
                        "description": "pending, awaiting, paid, failed, partially_refunded or refunded.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "Only orders placed at or after this date or time.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "expand",
                        "in": "query",
                        "required": false,
                        "description": "full: add tracking_url, cancel_reason, refund_status, refunded_amount, updated_at, gift, gift_message and packaging.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "full"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Rows per page, 1 to 100 (default 25). per_page works too.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "description": "Only rows changed at or after this time (ISO 8601, for example 2026-11-21T10:00:00Z, or a date).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/orders/{number}": {
            "get": {
                "operationId": "getOrder",
                "summary": "Get an order",
                "description": "One order by its order number (for example GK-261008-7WNM; it is text, a prefix, the date and four letters or digits). The order carries a read-only source (website, phone, whatsapp, counter, marketplace or other). Add expand=full for the extra fields, which include the read-only gift fields (gift, gift_message and packaging). Required scope: read:orders.",
                "tags": [
                    "Orders"
                ],
                "x-required-scope": "read:orders",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Order"
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "id": 1024,
                                        "number": "GK-261008-7WNM",
                                        "status": "placed",
                                        "payment_method": "cod",
                                        "payment_status": "pending",
                                        "subtotal": 1197,
                                        "discount": 100,
                                        "shipping": 60,
                                        "total": 1217,
                                        "coupon": "WELCOME10",
                                        "customer": {
                                            "name": "Sample Customer",
                                            "email": "buyer@example.com",
                                            "phone": "9000000000"
                                        },
                                        "address": {
                                            "line1": "12 Sample Street",
                                            "line2": null,
                                            "city": "Sample City",
                                            "state": "Sample State",
                                            "pincode": "123456"
                                        },
                                        "courier": null,
                                        "awb": null,
                                        "items": [
                                            {
                                                "product_id": 7,
                                                "name": "Sample Product",
                                                "variant": "250 g",
                                                "price": 399,
                                                "qty": 3
                                            }
                                        ],
                                        "created_at": "2026-11-21T10:15:00+00:00",
                                        "source": "website"
                                    },
                                    "meta": {}
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope read:orders, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "number",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "The order number. It is text: a prefix, the date and four letters or digits, for example GK-261008-7WNM."
                    },
                    {
                        "name": "expand",
                        "in": "query",
                        "required": false,
                        "description": "full: add tracking_url, cancel_reason, refund_status, refunded_amount, updated_at, gift, gift_message and packaging.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "full"
                            ]
                        }
                    }
                ]
            },
            "patch": {
                "operationId": "updateOrder",
                "summary": "Change an order's status",
                "description": "Moves the order to another status with the same rules as the admin: a cancelled order cannot move on, an online order must be paid before it is packed, shipped, out for delivery or delivered, and cancelling needs a reason (it gives the stock back). The customer messages (email, SMS / WhatsApp), the stock, the audit log and the webhooks are exactly those of the admin. Payment status and amounts cannot be changed. Required scope: write:orders.",
                "tags": [
                    "Orders"
                ],
                "x-required-scope": "write:orders",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/OrderFull"
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "id": 1024,
                                        "number": "GK-261008-7WNM",
                                        "status": "placed",
                                        "payment_method": "cod",
                                        "payment_status": "pending",
                                        "subtotal": 1197,
                                        "discount": 100,
                                        "shipping": 60,
                                        "total": 1217,
                                        "coupon": "WELCOME10",
                                        "customer": {
                                            "name": "Sample Customer",
                                            "email": "buyer@example.com",
                                            "phone": "9000000000"
                                        },
                                        "address": {
                                            "line1": "12 Sample Street",
                                            "line2": null,
                                            "city": "Sample City",
                                            "state": "Sample State",
                                            "pincode": "123456"
                                        },
                                        "courier": null,
                                        "awb": null,
                                        "items": [
                                            {
                                                "product_id": 7,
                                                "name": "Sample Product",
                                                "variant": "250 g",
                                                "price": 399,
                                                "qty": 3
                                            }
                                        ],
                                        "created_at": "2026-11-21T10:15:00+00:00",
                                        "source": "website",
                                        "tracking_url": null,
                                        "cancel_reason": null,
                                        "refund_status": "none",
                                        "refunded_amount": 0,
                                        "updated_at": "2026-11-21T10:15:00Z",
                                        "gift": true,
                                        "gift_message": "Happy celebrations! With best wishes.",
                                        "packaging": {
                                            "name": "Sample Packaging",
                                            "fee": 60,
                                            "gst_rate": 18
                                        }
                                    },
                                    "meta": {}
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope write:orders, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The request was refused: see error.fields.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "The Idempotency-Key was reused for a different request, or the change conflicts with the current state.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "number",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "The order number. It is text: a prefix, the date and four letters or digits, for example GK-261008-7WNM."
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "A unique value (up to 100 characters) for this request. Repeating the request with the same key returns the stored answer instead of doing it twice (kept 24 hours).",
                        "schema": {
                            "type": "string",
                            "maxLength": 100
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "The new status.",
                                        "enum": [
                                            "placed",
                                            "packed",
                                            "shipped",
                                            "out_for_delivery",
                                            "delivered",
                                            "cancelled"
                                        ],
                                        "example": "packed"
                                    },
                                    "reason": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Why the order is cancelled (required when status is cancelled).",
                                        "maxLength": 500,
                                        "example": "Customer asked to cancel"
                                    },
                                    "note": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "An internal note saved with the change.",
                                        "maxLength": 2000,
                                        "example": "Packed by the warehouse system"
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            },
                            "example": {
                                "status": "packed",
                                "note": "Packed by the warehouse system"
                            }
                        }
                    }
                }
            }
        },
        "/orders/{number}/shipment": {
            "post": {
                "operationId": "addShipment",
                "summary": "Add shipment details",
                "description": "Saves the courier, AWB and tracking link, and moves a placed or packed order to shipped when that is allowed (an online order must be paid first). The \"Shipped\" message to the customer is sent as in the admin. If the tracking link is left out it is built from the courier and AWB when the courier is listed in Settings > Shipping. Calling it again on a shipped order only updates the details. Required scope: write:orders.",
                "tags": [
                    "Orders"
                ],
                "x-required-scope": "write:orders",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/OrderFull"
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "id": 1024,
                                        "number": "GK-261008-7WNM",
                                        "status": "placed",
                                        "payment_method": "cod",
                                        "payment_status": "pending",
                                        "subtotal": 1197,
                                        "discount": 100,
                                        "shipping": 60,
                                        "total": 1217,
                                        "coupon": "WELCOME10",
                                        "customer": {
                                            "name": "Sample Customer",
                                            "email": "buyer@example.com",
                                            "phone": "9000000000"
                                        },
                                        "address": {
                                            "line1": "12 Sample Street",
                                            "line2": null,
                                            "city": "Sample City",
                                            "state": "Sample State",
                                            "pincode": "123456"
                                        },
                                        "courier": null,
                                        "awb": null,
                                        "items": [
                                            {
                                                "product_id": 7,
                                                "name": "Sample Product",
                                                "variant": "250 g",
                                                "price": 399,
                                                "qty": 3
                                            }
                                        ],
                                        "created_at": "2026-11-21T10:15:00+00:00",
                                        "source": "website",
                                        "tracking_url": null,
                                        "cancel_reason": null,
                                        "refund_status": "none",
                                        "refunded_amount": 0,
                                        "updated_at": "2026-11-21T10:15:00Z",
                                        "gift": true,
                                        "gift_message": "Happy celebrations! With best wishes.",
                                        "packaging": {
                                            "name": "Sample Packaging",
                                            "fee": 60,
                                            "gst_rate": 18
                                        }
                                    },
                                    "meta": {}
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope write:orders, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The request was refused: see error.fields.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "The Idempotency-Key was reused for a different request, or the change conflicts with the current state.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "number",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "The order number. It is text: a prefix, the date and four letters or digits, for example GK-261008-7WNM."
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "A unique value (up to 100 characters) for this request. Repeating the request with the same key returns the stored answer instead of doing it twice (kept 24 hours).",
                        "schema": {
                            "type": "string",
                            "maxLength": 100
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                    "courier": {
                                        "type": "string",
                                        "description": "Courier name, for example Sample Courier.",
                                        "maxLength": 100,
                                        "example": "Sample Courier"
                                    },
                                    "awb": {
                                        "type": "string",
                                        "description": "AWB / consignment number.",
                                        "maxLength": 100,
                                        "example": "38472910"
                                    },
                                    "tracking_url": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Tracking link (an http or https address).",
                                        "maxLength": 500,
                                        "example": "https://courier.example.com/track/38472910"
                                    }
                                },
                                "required": [
                                    "courier",
                                    "awb"
                                ]
                            },
                            "example": {
                                "courier": "Sample Courier",
                                "awb": "38472910"
                            }
                        }
                    }
                }
            }
        },
        "/orders/{number}/notes": {
            "post": {
                "operationId": "addOrderNote",
                "summary": "Add an internal note",
                "description": "Adds a note to the order history. Notes are internal: the customer never sees them. Required scope: write:orders.",
                "tags": [
                    "Orders"
                ],
                "x-required-scope": "write:orders",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/OrderFull"
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "id": 1024,
                                        "number": "GK-261008-7WNM",
                                        "status": "placed",
                                        "payment_method": "cod",
                                        "payment_status": "pending",
                                        "subtotal": 1197,
                                        "discount": 100,
                                        "shipping": 60,
                                        "total": 1217,
                                        "coupon": "WELCOME10",
                                        "customer": {
                                            "name": "Sample Customer",
                                            "email": "buyer@example.com",
                                            "phone": "9000000000"
                                        },
                                        "address": {
                                            "line1": "12 Sample Street",
                                            "line2": null,
                                            "city": "Sample City",
                                            "state": "Sample State",
                                            "pincode": "123456"
                                        },
                                        "courier": null,
                                        "awb": null,
                                        "items": [
                                            {
                                                "product_id": 7,
                                                "name": "Sample Product",
                                                "variant": "250 g",
                                                "price": 399,
                                                "qty": 3
                                            }
                                        ],
                                        "created_at": "2026-11-21T10:15:00+00:00",
                                        "source": "website",
                                        "tracking_url": null,
                                        "cancel_reason": null,
                                        "refund_status": "none",
                                        "refunded_amount": 0,
                                        "updated_at": "2026-11-21T10:15:00Z",
                                        "gift": true,
                                        "gift_message": "Happy celebrations! With best wishes.",
                                        "packaging": {
                                            "name": "Sample Packaging",
                                            "fee": 60,
                                            "gst_rate": 18
                                        }
                                    },
                                    "meta": {}
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope write:orders, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The request was refused: see error.fields.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "The Idempotency-Key was reused for a different request, or the change conflicts with the current state.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "number",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "The order number. It is text: a prefix, the date and four letters or digits, for example GK-261008-7WNM."
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "A unique value (up to 100 characters) for this request. Repeating the request with the same key returns the stored answer instead of doing it twice (kept 24 hours).",
                        "schema": {
                            "type": "string",
                            "maxLength": 100
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                    "note": {
                                        "type": "string",
                                        "description": "The note.",
                                        "maxLength": 2000,
                                        "example": "Customer called to confirm the address."
                                    }
                                },
                                "required": [
                                    "note"
                                ]
                            },
                            "example": {
                                "note": "Customer called to confirm the address."
                            }
                        }
                    }
                }
            }
        },
        "/customers": {
            "get": {
                "operationId": "listCustomers",
                "summary": "List customers (contacts)",
                "description": "Your contact list: name, type, status, order counts and dates. Email and phone are MASKED (a***@example.com, ******3210) unless the key has the personal details option. Consent, notes, tags and spend are never returned. Required scope: read:customers.",
                "tags": [
                    "Customers"
                ],
                "x-required-scope": "read:customers",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Customer"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        },
                                        "links": {
                                            "$ref": "#/components/schemas/Links"
                                        }
                                    }
                                },
                                "example": {
                                    "data": [
                                        {
                                            "id": 55,
                                            "name": "Sample Customer",
                                            "type": "customer",
                                            "status": "active",
                                            "email": "b***@example.com",
                                            "phone": "********0000",
                                            "city": "Sample City",
                                            "state": "Sample State",
                                            "orders_count": 1,
                                            "paid_orders_count": 1,
                                            "last_order_at": "2026-11-21T10:15:00Z",
                                            "created_at": "2026-11-21T10:15:00Z",
                                            "updated_at": "2026-11-21T10:15:00Z"
                                        }
                                    ],
                                    "meta": {
                                        "page": 1,
                                        "per_page": 25,
                                        "total": 1,
                                        "last_page": 1
                                    },
                                    "links": {
                                        "first": "https://yourstore.example.com/api/v1/customers?page=1",
                                        "last": "https://yourstore.example.com/api/v1/customers?page=1",
                                        "prev": null,
                                        "next": null
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope read:customers, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "customer, lead, partner, subscriber, retailer, distributor, restaurant, bulk_buyer, consumer or other.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "active, inactive or archived.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "active",
                                "inactive",
                                "archived"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Rows per page, 1 to 100 (default 25). per_page works too.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "description": "Only rows changed at or after this time (ISO 8601, for example 2026-11-21T10:00:00Z, or a date).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/customers/{id}": {
            "get": {
                "operationId": "getCustomer",
                "summary": "Get a customer",
                "description": "One contact by id (masked unless the key has the personal details option). Required scope: read:customers.",
                "tags": [
                    "Customers"
                ],
                "x-required-scope": "read:customers",
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Customer"
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                },
                                "example": {
                                    "data": {
                                        "id": 55,
                                        "name": "Sample Customer",
                                        "type": "customer",
                                        "status": "active",
                                        "email": "b***@example.com",
                                        "phone": "********0000",
                                        "city": "Sample City",
                                        "state": "Sample State",
                                        "orders_count": 1,
                                        "paid_orders_count": 1,
                                        "last_order_at": "2026-11-21T10:15:00Z",
                                        "created_at": "2026-11-21T10:15:00Z",
                                        "updated_at": "2026-11-21T10:15:00Z"
                                    },
                                    "meta": {}
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, invalid, revoked or expired key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The key lacks the scope read:customers, is switched off, or is used from a blocked address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests (see the Retry-After header).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "The resource id."
                    }
                ]
            }
        }
    },
    "components": {
        "schemas": {
            "Product": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "sku": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "name": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "active": {
                        "type": "boolean"
                    },
                    "category": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "url": {
                        "type": "string"
                    },
                    "short": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "images": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "variants": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "label": {
                                    "type": "string"
                                },
                                "price": {
                                    "type": "integer"
                                },
                                "mrp": {
                                    "type": "integer"
                                },
                                "stock": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            },
            "ProductFull": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "sku": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "name": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "active": {
                        "type": "boolean"
                    },
                    "category": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "url": {
                        "type": "string"
                    },
                    "short": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "images": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "variants": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "label": {
                                    "type": "string"
                                },
                                "price": {
                                    "type": "integer"
                                },
                                "mrp": {
                                    "type": "integer"
                                },
                                "stock": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "status": {
                        "type": "string"
                    },
                    "category_id": {
                        "type": "integer"
                    },
                    "hsn": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "gst_rate": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "sort": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "description": {
                        "type": "string"
                    }
                }
            },
            "Variant": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "product_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "sku": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "label": {
                        "type": "string"
                    },
                    "price": {
                        "type": "integer"
                    },
                    "mrp": {
                        "type": "integer"
                    },
                    "weight_grams": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "sort": {
                        "type": "integer"
                    },
                    "stock": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                }
            },
            "Category": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "sort": {
                        "type": "integer"
                    },
                    "archived": {
                        "type": "boolean"
                    },
                    "general": {
                        "type": "boolean"
                    },
                    "products_count": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                }
            },
            "Order": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "number": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "payment_method": {
                        "type": "string"
                    },
                    "payment_status": {
                        "type": "string"
                    },
                    "subtotal": {
                        "type": "integer"
                    },
                    "discount": {
                        "type": "integer"
                    },
                    "shipping": {
                        "type": "integer"
                    },
                    "total": {
                        "type": "integer"
                    },
                    "coupon": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "customer": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "email": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "phone": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    "address": {
                        "type": "object",
                        "properties": {
                            "line1": {
                                "type": "string"
                            },
                            "line2": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "city": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "state": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "pincode": {
                                "type": "string"
                            }
                        }
                    },
                    "courier": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "awb": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "product_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                },
                                "name": {
                                    "type": "string"
                                },
                                "variant": {
                                    "type": "string"
                                },
                                "price": {
                                    "type": "integer"
                                },
                                "qty": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "source": {
                        "type": "string",
                        "description": "Where the order came from (read-only): website, phone, whatsapp, counter, marketplace or other."
                    }
                }
            },
            "OrderFull": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "number": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "payment_method": {
                        "type": "string"
                    },
                    "payment_status": {
                        "type": "string"
                    },
                    "subtotal": {
                        "type": "integer"
                    },
                    "discount": {
                        "type": "integer"
                    },
                    "shipping": {
                        "type": "integer"
                    },
                    "total": {
                        "type": "integer"
                    },
                    "coupon": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "customer": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "email": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "phone": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    "address": {
                        "type": "object",
                        "properties": {
                            "line1": {
                                "type": "string"
                            },
                            "line2": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "city": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "state": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "pincode": {
                                "type": "string"
                            }
                        }
                    },
                    "courier": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "awb": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "product_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                },
                                "name": {
                                    "type": "string"
                                },
                                "variant": {
                                    "type": "string"
                                },
                                "price": {
                                    "type": "integer"
                                },
                                "qty": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "source": {
                        "type": "string",
                        "description": "Where the order came from (read-only): website, phone, whatsapp, counter, marketplace or other."
                    },
                    "tracking_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "cancel_reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "refund_status": {
                        "type": "string"
                    },
                    "refunded_amount": {
                        "type": "number"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "gift": {
                        "type": "boolean",
                        "description": "True when the shopper marked the order as a gift (read-only)."
                    },
                    "gift_message": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The plain-text gift message the shopper wrote, or null (read-only). A webhook endpoint that is set not to include personal details always gets null here."
                    },
                    "packaging": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "fee": {
                                "type": "integer"
                            },
                            "gst_rate": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            }
                        },
                        "description": "The gift packaging chosen, as it was when the order was placed: name, fee in whole currency units (already inside total) and gst_rate in percent. null when none was chosen (read-only)."
                    }
                }
            },
            "Customer": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "city": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "state": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "orders_count": {
                        "type": "integer"
                    },
                    "paid_orders_count": {
                        "type": "integer"
                    },
                    "last_order_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                }
            },
            "InventoryRow": {
                "type": "object",
                "properties": {
                    "variant_id": {
                        "type": "integer"
                    },
                    "product_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "product": {
                        "type": "string"
                    },
                    "size": {
                        "type": "string"
                    },
                    "sku": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "on_hand": {
                        "type": "integer"
                    },
                    "reserved": {
                        "type": "integer"
                    },
                    "available": {
                        "type": "integer"
                    },
                    "reorder_level": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "status": {
                        "type": "string"
                    },
                    "counted_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                }
            },
            "Movement": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "variant_id": {
                        "type": "integer"
                    },
                    "product_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "sku": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "reason": {
                        "type": "string"
                    },
                    "reason_label": {
                        "type": "string"
                    },
                    "change": {
                        "type": "integer"
                    },
                    "balance_after": {
                        "type": "integer"
                    },
                    "reference": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "type": {
                                "type": "string"
                            },
                            "id": {
                                "type": "integer"
                            }
                        }
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "by": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string"
                    }
                }
            },
            "Adjustment": {
                "type": "object",
                "properties": {
                    "movement_id": {
                        "type": "integer"
                    },
                    "variant_id": {
                        "type": "integer"
                    },
                    "mode": {
                        "type": "string"
                    },
                    "before": {
                        "type": "integer"
                    },
                    "after": {
                        "type": "integer"
                    },
                    "change": {
                        "type": "integer"
                    },
                    "inventory": {
                        "type": "object",
                        "properties": {
                            "variant_id": {
                                "type": "integer"
                            },
                            "product_id": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "product": {
                                "type": "string"
                            },
                            "size": {
                                "type": "string"
                            },
                            "sku": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "on_hand": {
                                "type": "integer"
                            },
                            "reserved": {
                                "type": "integer"
                            },
                            "available": {
                                "type": "integer"
                            },
                            "reorder_level": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "status": {
                                "type": "string"
                            },
                            "counted_at": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "updated_at": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    }
                }
            },
            "Error": {
                "type": "object",
                "required": [
                    "error"
                ],
                "properties": {
                    "error": {
                        "type": "object",
                        "required": [
                            "code",
                            "message"
                        ],
                        "properties": {
                            "code": {
                                "type": "string",
                                "description": "A short stable code such as validation_failed, insufficient_scope, not_found, conflict, rate_limited."
                            },
                            "message": {
                                "type": "string",
                                "description": "What went wrong, in plain words."
                            },
                            "fields": {
                                "type": "object",
                                "description": "For 422: each field with what to fix.",
                                "additionalProperties": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                }
                            },
                            "required_scope": {
                                "type": "string",
                                "description": "For 403 insufficient_scope: the scope the key is missing."
                            }
                        }
                    }
                }
            },
            "Meta": {
                "type": "object",
                "description": "Lists: page, per_page, total, last_page. Other answers: empty.",
                "properties": {
                    "page": {
                        "type": "integer"
                    },
                    "per_page": {
                        "type": "integer"
                    },
                    "total": {
                        "type": "integer"
                    },
                    "last_page": {
                        "type": "integer"
                    }
                }
            },
            "Links": {
                "type": "object",
                "properties": {
                    "first": {
                        "type": "string"
                    },
                    "last": {
                        "type": "string"
                    },
                    "prev": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "next": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                }
            }
        },
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "Authorization: Bearer YOUR_API_KEY"
            },
            "apiKeyHeader": {
                "type": "apiKey",
                "in": "header",
                "name": "X-Api-Key",
                "description": "X-Api-Key: YOUR_API_KEY (use either this header or Authorization: Bearer)."
            }
        }
    }
}
