{
    "openapi": "3.0.0",
    "info": {
        "title": "CloudShop",
        "description": "Our API Connect structure is modeled after Shopify API to reduce entry barrier for integrators. NOTE this different terminology mapping: Ainur Groups (one per product) are mapped to “ext-category” similar to product categories/collections in Shopify. Also Ainur categories (many per product) are better known as Tags and are therefore mapped to “ext-tags” variable, matching Shopify naming.\n\n**Required fields:** In request bodies, query parameters, and headers, any field marked as required in the schema (and shown with an asterisk * next to the name in Swagger UI) must be provided.",
        "version": "1.0.10"
    },
    "servers": [
        {
            "url": "https://connect-api.cloudshop.ru/api/v4",
            "description": "Main API Server"
        }
    ],
    "paths": {
        "/company": {
            "get": {
                "tags": [
                    "Company"
                ],
                "summary": "Getting company information",
                "description": "Returns company information for the authenticated token. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "487a76ccd222ec1aa2192fa05f606d43",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Company information retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "description": "Unique company identifier",
                                            "type": "string",
                                            "example": "68625d39439bfd7a7402615c"
                                        },
                                        "plan": {
                                            "description": "Current subscription plan of the company",
                                            "type": "string",
                                            "example": "base"
                                        },
                                        "email": {
                                            "description": "Primary email address of the company",
                                            "type": "string",
                                            "example": "test-api@gmail.com"
                                        },
                                        "contacts": {
                                            "description": "Primary contact information",
                                            "properties": {
                                                "name": {
                                                    "description": "Contact person name",
                                                    "type": "string",
                                                    "example": "TestAPI"
                                                },
                                                "phone": {
                                                    "description": "Contact phone number",
                                                    "type": "string",
                                                    "example": "+822828282828"
                                                },
                                                "email": {
                                                    "description": "Contact email address",
                                                    "type": "string",
                                                    "example": "test-api@gmail.com"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "settings": {
                                            "description": "Company settings",
                                            "properties": {
                                                "company": {
                                                    "description": "Core company configuration",
                                                    "properties": {
                                                        "name": {
                                                            "description": "Company display name",
                                                            "type": "string",
                                                            "example": "Новое2"
                                                        },
                                                        "email": {
                                                            "description": "Company email address",
                                                            "type": "string",
                                                            "example": "test-api@gmail.com"
                                                        },
                                                        "phones": {
                                                            "description": "List of company phone numbers",
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string",
                                                                "example": "+822828282828"
                                                            }
                                                        },
                                                        "country": {
                                                            "description": "Country code",
                                                            "type": "string",
                                                            "example": "country_RU"
                                                        },
                                                        "currency_iso": {
                                                            "description": "ISO 4217 currency code",
                                                            "type": "string",
                                                            "example": "RUB"
                                                        },
                                                        "currency": {
                                                            "description": "Currency symbol",
                                                            "type": "string",
                                                            "example": "₽"
                                                        },
                                                        "timezone": {
                                                            "description": "Timezone offset in seconds from UTC",
                                                            "type": "integer",
                                                            "example": 10800
                                                        },
                                                        "daily_email_report": {
                                                            "description": "Whether daily email reports are enabled",
                                                            "type": "boolean",
                                                            "example": true
                                                        },
                                                        "ecom_invite_accepted": {
                                                            "description": "Whether the e-commerce invite has been accepted",
                                                            "type": "boolean",
                                                            "example": true
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "currentUser": {
                                            "description": "Information about the currently authenticated user",
                                            "properties": {
                                                "type": {
                                                    "description": "User role within the company (e.g. owner, staff)",
                                                    "type": "string",
                                                    "example": "owner"
                                                },
                                                "invited": {
                                                    "description": "Unix timestamp when the user was invited",
                                                    "type": "integer",
                                                    "example": 1751276857
                                                },
                                                "stopped": {
                                                    "description": "Unix timestamp when the user was deactivated (null if active)",
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "stores": {
                                                    "description": "List of store IDs the user has access to",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/company/statistic": {
            "get": {
                "tags": [
                    "Company"
                ],
                "summary": "Getting company statistics",
                "description": "Returns company statistics. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "6a6304f9bf453e110dd37656b589f2e0",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Company statistics retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "catalog": {
                                            "description": "Total number of products in the catalog",
                                            "type": "integer",
                                            "example": 1700
                                        },
                                        "stores": {
                                            "description": "Total number of stores",
                                            "type": "integer",
                                            "example": 6
                                        },
                                        "registers": {
                                            "description": "Total number of cash registers",
                                            "type": "integer",
                                            "example": 2
                                        },
                                        "clients": {
                                            "description": "Total number of clients",
                                            "type": "integer",
                                            "example": 262
                                        },
                                        "suppliers": {
                                            "description": "Total number of suppliers",
                                            "type": "integer",
                                            "example": 5
                                        },
                                        "staff": {
                                            "description": "Total number of staff members",
                                            "type": "integer",
                                            "example": 7
                                        },
                                        "ecommerce": {
                                            "description": "Whether e-commerce module is enabled",
                                            "type": "boolean",
                                            "example": false
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/company/settings": {
            "put": {
                "tags": [
                    "Company"
                ],
                "summary": "Update company settings",
                "description": "Updates company settings. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "983a49ceea136c9842032c3f58f329dd",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    }
                ],
                "requestBody": {
                    "description": "Company update payload",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "My Company"
                                    },
                                    "country": {
                                        "type": "string",
                                        "example": "UA"
                                    },
                                    "currency": {
                                        "type": "string",
                                        "example": "₴"
                                    },
                                    "currency_iso": {
                                        "type": "string",
                                        "example": "UAH"
                                    },
                                    "address": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "emails": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "format": "email"
                                        }
                                    },
                                    "phones": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "example": "+380991234567"
                                        }
                                    },
                                    "web": {
                                        "type": "string",
                                        "example": "https://example.ua",
                                        "nullable": true
                                    },
                                    "legal_name": {
                                        "type": "string",
                                        "example": "value"
                                    },
                                    "legal_full_name": {
                                        "type": "string",
                                        "example": "example full name"
                                    },
                                    "details": {
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "key",
                                                "value"
                                            ],
                                            "properties": {
                                                "key": {
                                                    "type": "string",
                                                    "example": "test"
                                                },
                                                "value": {
                                                    "type": "string",
                                                    "example": "12345678"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "bank_details": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "example": "test 'Test'"
                                        }
                                    },
                                    "head_name": {
                                        "type": "string",
                                        "example": "test test"
                                    },
                                    "head_position": {
                                        "type": "string",
                                        "example": "Test"
                                    },
                                    "accountant_name": {
                                        "type": "string",
                                        "example": "Test Test"
                                    },
                                    "vat": {
                                        "type": "boolean",
                                        "example": true
                                    },
                                    "vat_rates": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "example": "20%"
                                        }
                                    },
                                    "vat_templates": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "example": "invoice_template_ua"
                                        }
                                    },
                                    "timezone": {
                                        "description": "Offset in seconds from UTC",
                                        "type": "integer",
                                        "example": 10800
                                    },
                                    "daily_email_report": {
                                        "type": "boolean",
                                        "example": true
                                    },
                                    "tax_number": {
                                        "type": "string",
                                        "example": "1234567890"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Company settings updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "description": "Unique company identifier",
                                            "type": "string",
                                            "example": "68625d39439bfd7a7402615c"
                                        },
                                        "plan": {
                                            "description": "Current subscription plan of the company",
                                            "type": "string",
                                            "example": "base"
                                        },
                                        "email": {
                                            "description": "Primary email address of the company",
                                            "type": "string",
                                            "example": "test-api@gmail.com"
                                        },
                                        "contacts": {
                                            "description": "Primary contact information",
                                            "properties": {
                                                "name": {
                                                    "description": "Contact person name",
                                                    "type": "string",
                                                    "example": "TestAPI"
                                                },
                                                "phone": {
                                                    "description": "Contact phone number",
                                                    "type": "string",
                                                    "example": "+822828282828"
                                                },
                                                "email": {
                                                    "description": "Contact email address",
                                                    "type": "string",
                                                    "example": "test-api@gmail.com"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "settings": {
                                            "description": "Company settings",
                                            "properties": {
                                                "company": {
                                                    "description": "Core company configuration",
                                                    "properties": {
                                                        "name": {
                                                            "description": "Company display name",
                                                            "type": "string",
                                                            "example": "Test"
                                                        },
                                                        "email": {
                                                            "description": "Company email address",
                                                            "type": "string",
                                                            "example": "test-api@gmail.com"
                                                        },
                                                        "phones": {
                                                            "description": "List of company phone numbers",
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string",
                                                                "example": "+822828282828"
                                                            }
                                                        },
                                                        "country": {
                                                            "description": "Country code",
                                                            "type": "string",
                                                            "example": "country_RU"
                                                        },
                                                        "currency_iso": {
                                                            "description": "ISO 4217 currency code",
                                                            "type": "string",
                                                            "example": "RUB"
                                                        },
                                                        "currency": {
                                                            "description": "Currency symbol",
                                                            "type": "string",
                                                            "example": "₽"
                                                        },
                                                        "timezone": {
                                                            "description": "Timezone offset in seconds from UTC",
                                                            "type": "integer",
                                                            "example": 10800
                                                        },
                                                        "daily_email_report": {
                                                            "description": "Whether daily email reports are enabled",
                                                            "type": "boolean",
                                                            "example": true
                                                        },
                                                        "ecom_invite_accepted": {
                                                            "description": "Whether the e-commerce invite has been accepted",
                                                            "type": "boolean",
                                                            "example": true
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "currentUser": {
                                            "description": "Information about the currently authenticated user",
                                            "properties": {
                                                "type": {
                                                    "description": "User role within the company (e.g. owner, staff)",
                                                    "type": "string",
                                                    "example": "owner"
                                                },
                                                "invited": {
                                                    "description": "Unix timestamp when the user was invited",
                                                    "type": "integer",
                                                    "example": 1751276857
                                                },
                                                "stopped": {
                                                    "description": "Unix timestamp when the user was deactivated (null if active)",
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "stores": {
                                                    "description": "List of store IDs the user has access to",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/customers": {
            "get": {
                "tags": [
                    "Customer"
                ],
                "summary": "Getting customers",
                "description": "Getting customers. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "bb1117f551dccc7dd77c009d29818002",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOi..."
                        }
                    },
                    {
                        "name": "updated_start",
                        "in": "query",
                        "description": "Start of updated date range (format: Y-m-d H:i:s). Must be before or equal to updated_end.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2004-01-10 00:00:00"
                        }
                    },
                    {
                        "name": "updated_end",
                        "in": "query",
                        "description": "End of updated date range (format: Y-m-d H:i:s). Must be after or equal to updated_start.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2025-08-01 00:00:00"
                        }
                    },
                    {
                        "name": "has_debt",
                        "in": "query",
                        "description": "Filter customers with debt greater than 0",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "example": true
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Limit number of returned results",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 50
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "description": "Offset for paginated results",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 0
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of customers retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "id": {
                                                "description": "Unique customer identifier",
                                                "type": "string",
                                                "example": "686274c0baba51adda055e1f"
                                            },
                                            "uuid": {
                                                "description": "Customer UUID",
                                                "type": "string",
                                                "example": "15a000bd-ab2b-4ec2-bc92-fe3c11ca62e1"
                                            },
                                            "date_created": {
                                                "description": "Date and time when the customer was created",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2017-03-21T16:09:28"
                                            },
                                            "date_modified": {
                                                "description": "Date and time when the customer was last modified",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2017-03-21T16:09:30"
                                            },
                                            "emails": {
                                                "description": "List of customer email addresses",
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "format": "email",
                                                    "example": "user@example.com"
                                                }
                                            },
                                            "name": {
                                                "description": "Customer full name",
                                                "type": "string",
                                                "example": "name"
                                            },
                                            "sex": {
                                                "description": "Customer gender",
                                                "type": "string",
                                                "enum": [
                                                    "male",
                                                    "female",
                                                    "other"
                                                ],
                                                "example": "male",
                                                "nullable": true
                                            },
                                            "birthday": {
                                                "description": "Date of birth in Y-m-d format (converted from upstream UNIX timestamp bday)",
                                                "type": "string",
                                                "format": "date",
                                                "example": "2025-07-30",
                                                "nullable": true
                                            },
                                            "billing": {
                                                "description": "Billing contact associated with the customer",
                                                "properties": {
                                                    "id": {
                                                        "description": "Billing contact identifier",
                                                        "type": "string",
                                                        "example": "68625d39439bfd7a7402615b"
                                                    },
                                                    "name": {
                                                        "description": "Billing contact name",
                                                        "type": "string",
                                                        "example": "John"
                                                    },
                                                    "email": {
                                                        "description": "Billing contact email address",
                                                        "type": "string",
                                                        "format": "email",
                                                        "example": "john.doe@example.com"
                                                    },
                                                    "phone": {
                                                        "description": "Billing contact phone number",
                                                        "type": "string",
                                                        "example": "+123456789"
                                                    }
                                                },
                                                "type": "object"
                                            },
                                            "loyalty": {
                                                "description": "Loyalty program data",
                                                "properties": {
                                                    "type": {
                                                        "description": "Loyalty type",
                                                        "type": "string",
                                                        "enum": [
                                                            "discount",
                                                            "bonus"
                                                        ],
                                                        "example": "discount"
                                                    },
                                                    "bonus_balance": {
                                                        "description": "Current bonus balance",
                                                        "type": "number",
                                                        "example": 150
                                                    },
                                                    "bonus_spent": {
                                                        "description": "Total bonuses spent",
                                                        "type": "number",
                                                        "example": 50
                                                    },
                                                    "cashback_rate": {
                                                        "description": "Cashback rate",
                                                        "type": "number",
                                                        "example": 5
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "Customer"
                ],
                "summary": "Create a new customer",
                "description": "Create a new customer. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "4200414c673edebcd23b1442f249c908",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOi..."
                        }
                    }
                ],
                "requestBody": {
                    "description": "Customer data",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "enum": [
                                            "person",
                                            "company"
                                        ],
                                        "example": "person"
                                    },
                                    "emails": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "format": "email",
                                            "example": "TEST@TEST.com"
                                        }
                                    },
                                    "phones": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "example": "380000000000"
                                        }
                                    },
                                    "enable_savings": {
                                        "type": "boolean",
                                        "example": false
                                    },
                                    "address": {
                                        "properties": {
                                            "actual": {
                                                "type": "string",
                                                "example": null,
                                                "nullable": true
                                            },
                                            "legal": {
                                                "type": "string",
                                                "example": null,
                                                "nullable": true
                                            }
                                        },
                                        "type": "object"
                                    },
                                    "details": {
                                        "type": "array",
                                        "items": {
                                            "type": "object"
                                        }
                                    },
                                    "bank_details": {
                                        "type": "array",
                                        "items": {
                                            "type": "object"
                                        }
                                    },
                                    "discount": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 0
                                    },
                                    "default": {
                                        "type": "boolean",
                                        "example": false
                                    },
                                    "loyalty_type": {
                                        "type": "string",
                                        "enum": [
                                            "discount",
                                            "bonus"
                                        ],
                                        "example": "discount"
                                    },
                                    "bonus_balance": {
                                        "type": "number",
                                        "example": 0
                                    },
                                    "bonus_spent": {
                                        "type": "number",
                                        "example": 0
                                    },
                                    "cashback_rate": {
                                        "type": "number",
                                        "example": 0
                                    },
                                    "debt": {
                                        "type": "number",
                                        "example": 0
                                    },
                                    "rdebt": {
                                        "type": "number",
                                        "example": 0
                                    },
                                    "name": {
                                        "type": "string",
                                        "example": "TEST"
                                    },
                                    "bday": {
                                        "description": "Birthday as UNIX timestamp",
                                        "type": "integer",
                                        "example": 1753868484
                                    },
                                    "sex": {
                                        "type": "string",
                                        "enum": [
                                            "male",
                                            "female",
                                            "other"
                                        ],
                                        "example": "male"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Customer created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "description": "Unique customer identifier",
                                            "type": "string",
                                            "example": "686274c0baba51adda055e1f"
                                        },
                                        "uuid": {
                                            "description": "Customer UUID",
                                            "type": "string",
                                            "example": "15a000bd-ab2b-4ec2-bc92-fe3c11ca62e1"
                                        },
                                        "date_created": {
                                            "description": "Date and time when the customer was created",
                                            "type": "string",
                                            "format": "date-time",
                                            "example": "2017-03-21T16:09:28"
                                        },
                                        "date_modified": {
                                            "description": "Date and time when the customer was last modified",
                                            "type": "string",
                                            "format": "date-time",
                                            "example": "2017-03-21T16:09:30"
                                        },
                                        "emails": {
                                            "description": "List of customer email addresses",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "format": "email",
                                                "example": "user@example.com"
                                            }
                                        },
                                        "name": {
                                            "description": "Customer full name",
                                            "type": "string",
                                            "example": "name"
                                        },
                                        "sex": {
                                            "description": "Customer gender",
                                            "type": "string",
                                            "enum": [
                                                "male",
                                                "female",
                                                "other"
                                            ],
                                            "example": "male",
                                            "nullable": true
                                        },
                                        "birthday": {
                                            "description": "Date of birth in Y-m-d format (converted from upstream UNIX timestamp bday)",
                                            "type": "string",
                                            "format": "date",
                                            "example": "2025-07-30",
                                            "nullable": true
                                        },
                                        "billing": {
                                            "description": "Billing contact associated with the customer",
                                            "properties": {
                                                "id": {
                                                    "description": "Billing contact identifier",
                                                    "type": "string",
                                                    "example": "68625d39439bfd7a7402615b"
                                                },
                                                "name": {
                                                    "description": "Billing contact name",
                                                    "type": "string",
                                                    "example": "John"
                                                },
                                                "email": {
                                                    "description": "Billing contact email address",
                                                    "type": "string",
                                                    "format": "email",
                                                    "example": "john.doe@example.com"
                                                },
                                                "phone": {
                                                    "description": "Billing contact phone number",
                                                    "type": "string",
                                                    "example": "+123456789"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "loyalty": {
                                            "description": "Loyalty program data",
                                            "properties": {
                                                "type": {
                                                    "description": "Loyalty type",
                                                    "type": "string",
                                                    "enum": [
                                                        "discount",
                                                        "bonus"
                                                    ],
                                                    "example": "discount"
                                                },
                                                "bonus_balance": {
                                                    "description": "Current bonus balance",
                                                    "type": "number",
                                                    "example": 150
                                                },
                                                "bonus_spent": {
                                                    "description": "Total bonuses spent",
                                                    "type": "number",
                                                    "example": 50
                                                },
                                                "cashback_rate": {
                                                    "description": "Cashback rate",
                                                    "type": "number",
                                                    "example": 5
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/customers/{customer}": {
            "get": {
                "tags": [
                    "Customer"
                ],
                "summary": "Get a customer by ID",
                "description": "Get a customer by ID. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "413cd8f9c880c13c5e4ea3b57b530424",
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "description": "Customer ID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "64e4ad9c96dbb"
                        }
                    },
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOi..."
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Customer retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "description": "Unique customer identifier",
                                            "type": "string",
                                            "example": "686274c0baba51adda055e1f"
                                        },
                                        "uuid": {
                                            "description": "Customer UUID",
                                            "type": "string",
                                            "example": "15a000bd-ab2b-4ec2-bc92-fe3c11ca62e1"
                                        },
                                        "date_created": {
                                            "description": "Date and time when the customer was created",
                                            "type": "string",
                                            "format": "date-time",
                                            "example": "2017-03-21T16:09:28"
                                        },
                                        "date_modified": {
                                            "description": "Date and time when the customer was last modified",
                                            "type": "string",
                                            "format": "date-time",
                                            "example": "2017-03-21T16:09:30"
                                        },
                                        "emails": {
                                            "description": "List of customer email addresses",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "format": "email",
                                                "example": "user@example.com"
                                            }
                                        },
                                        "name": {
                                            "description": "Customer full name",
                                            "type": "string",
                                            "example": "name"
                                        },
                                        "sex": {
                                            "description": "Customer gender",
                                            "type": "string",
                                            "enum": [
                                                "male",
                                                "female",
                                                "other"
                                            ],
                                            "example": "male",
                                            "nullable": true
                                        },
                                        "birthday": {
                                            "description": "Date of birth in Y-m-d format (converted from upstream UNIX timestamp bday)",
                                            "type": "string",
                                            "format": "date",
                                            "example": "2025-07-30",
                                            "nullable": true
                                        },
                                        "billing": {
                                            "description": "Billing contact associated with the customer",
                                            "properties": {
                                                "id": {
                                                    "description": "Billing contact identifier",
                                                    "type": "string",
                                                    "example": "68625d39439bfd7a7402615b"
                                                },
                                                "name": {
                                                    "description": "Billing contact name",
                                                    "type": "string",
                                                    "example": "John"
                                                },
                                                "email": {
                                                    "description": "Billing contact email address",
                                                    "type": "string",
                                                    "format": "email",
                                                    "example": "john.doe@example.com"
                                                },
                                                "phone": {
                                                    "description": "Billing contact phone number",
                                                    "type": "string",
                                                    "example": "+123456789"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "loyalty": {
                                            "description": "Loyalty program data",
                                            "properties": {
                                                "type": {
                                                    "description": "Loyalty type",
                                                    "type": "string",
                                                    "enum": [
                                                        "discount",
                                                        "bonus"
                                                    ],
                                                    "example": "discount"
                                                },
                                                "bonus_balance": {
                                                    "description": "Current bonus balance",
                                                    "type": "number",
                                                    "example": 150
                                                },
                                                "bonus_spent": {
                                                    "description": "Total bonuses spent",
                                                    "type": "number",
                                                    "example": 50
                                                },
                                                "cashback_rate": {
                                                    "description": "Cashback rate",
                                                    "type": "number",
                                                    "example": 5
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found - customer does not exist",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Customer not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "tags": [
                    "Customer"
                ],
                "summary": "Update a customer by ID",
                "description": "Update a customer by ID. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "1e450bb22dc75b46b7e383b539e804a2",
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "description": "Customer ID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "64e4ad9c96dbb"
                        }
                    },
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOi..."
                        }
                    }
                ],
                "requestBody": {
                    "description": "Customer data to update (all fields are optional)",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "enum": [
                                            "person",
                                            "company"
                                        ],
                                        "example": "person"
                                    },
                                    "emails": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "format": "email",
                                            "example": "TEST@TEST.com"
                                        }
                                    },
                                    "phones": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "example": "380000000000"
                                        }
                                    },
                                    "enable_savings": {
                                        "type": "boolean",
                                        "example": false
                                    },
                                    "address": {
                                        "properties": {
                                            "actual": {
                                                "type": "string",
                                                "example": null,
                                                "nullable": true
                                            },
                                            "legal": {
                                                "type": "string",
                                                "example": null,
                                                "nullable": true
                                            }
                                        },
                                        "type": "object"
                                    },
                                    "details": {
                                        "type": "array",
                                        "items": {
                                            "type": "object"
                                        }
                                    },
                                    "bank_details": {
                                        "type": "array",
                                        "items": {
                                            "type": "object"
                                        }
                                    },
                                    "discount": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 0
                                    },
                                    "default": {
                                        "type": "boolean",
                                        "example": false
                                    },
                                    "loyalty_type": {
                                        "type": "string",
                                        "enum": [
                                            "discount",
                                            "bonus"
                                        ],
                                        "example": "discount"
                                    },
                                    "bonus_balance": {
                                        "type": "number",
                                        "example": 0
                                    },
                                    "bonus_spent": {
                                        "type": "number",
                                        "example": 0
                                    },
                                    "cashback_rate": {
                                        "type": "number",
                                        "example": 0
                                    },
                                    "debt": {
                                        "type": "number",
                                        "example": 0
                                    },
                                    "rdebt": {
                                        "type": "number",
                                        "example": 0
                                    },
                                    "name": {
                                        "type": "string",
                                        "example": "TEST"
                                    },
                                    "bday": {
                                        "description": "Birthday as UNIX timestamp",
                                        "type": "integer",
                                        "example": 1753868484
                                    },
                                    "sex": {
                                        "type": "string",
                                        "enum": [
                                            "male",
                                            "female",
                                            "other"
                                        ],
                                        "example": "male"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Customer updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "description": "Unique customer identifier",
                                            "type": "string",
                                            "example": "686274c0baba51adda055e1f"
                                        },
                                        "uuid": {
                                            "description": "Customer UUID",
                                            "type": "string",
                                            "example": "15a000bd-ab2b-4ec2-bc92-fe3c11ca62e1"
                                        },
                                        "date_created": {
                                            "description": "Date and time when the customer was created",
                                            "type": "string",
                                            "format": "date-time",
                                            "example": "2017-03-21T16:09:28"
                                        },
                                        "date_modified": {
                                            "description": "Date and time when the customer was last modified",
                                            "type": "string",
                                            "format": "date-time",
                                            "example": "2017-03-21T16:09:30"
                                        },
                                        "emails": {
                                            "description": "List of customer email addresses",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "format": "email",
                                                "example": "user@example.com"
                                            }
                                        },
                                        "name": {
                                            "description": "Customer full name",
                                            "type": "string",
                                            "example": "name"
                                        },
                                        "sex": {
                                            "description": "Customer gender",
                                            "type": "string",
                                            "enum": [
                                                "male",
                                                "female",
                                                "other"
                                            ],
                                            "example": "male",
                                            "nullable": true
                                        },
                                        "birthday": {
                                            "description": "Date of birth in Y-m-d format (converted from upstream UNIX timestamp bday)",
                                            "type": "string",
                                            "format": "date",
                                            "example": "2025-07-30",
                                            "nullable": true
                                        },
                                        "billing": {
                                            "description": "Billing contact associated with the customer",
                                            "properties": {
                                                "id": {
                                                    "description": "Billing contact identifier",
                                                    "type": "string",
                                                    "example": "68625d39439bfd7a7402615b"
                                                },
                                                "name": {
                                                    "description": "Billing contact name",
                                                    "type": "string",
                                                    "example": "John"
                                                },
                                                "email": {
                                                    "description": "Billing contact email address",
                                                    "type": "string",
                                                    "format": "email",
                                                    "example": "john.doe@example.com"
                                                },
                                                "phone": {
                                                    "description": "Billing contact phone number",
                                                    "type": "string",
                                                    "example": "+123456789"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "loyalty": {
                                            "description": "Loyalty program data",
                                            "properties": {
                                                "type": {
                                                    "description": "Loyalty type",
                                                    "type": "string",
                                                    "enum": [
                                                        "discount",
                                                        "bonus"
                                                    ],
                                                    "example": "discount"
                                                },
                                                "bonus_balance": {
                                                    "description": "Current bonus balance",
                                                    "type": "number",
                                                    "example": 150
                                                },
                                                "bonus_spent": {
                                                    "description": "Total bonuses spent",
                                                    "type": "number",
                                                    "example": 50
                                                },
                                                "cashback_rate": {
                                                    "description": "Cashback rate",
                                                    "type": "number",
                                                    "example": 5
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found - customer does not exist",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Customer not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Customer"
                ],
                "summary": "Delete a customer by ID",
                "description": "Delete a customer by ID. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "d1bfc33dc8c17f339d7673425290f614",
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "description": "Customer ID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "64e4ad9c96dbb"
                        }
                    },
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOi..."
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Customer successfully deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "description": "Whether the deletion was successful",
                                            "type": "boolean",
                                            "example": true
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/documents/changes": {
            "get": {
                "tags": [
                    "Document"
                ],
                "summary": "Get inventory change documents",
                "description": "Returns a paginated list of inventory change (stock adjustment) documents for the company from the access token. If time_start and time_end are omitted, the last 7 days are used. When both dates are provided, the period must not exceed 31 days. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "94a8b99b86e387fc6d89601301f8c7d9",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "description": "Pagination: number of records to skip",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 0,
                            "example": 0
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Pagination: number of records to return (1–100)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "maximum": 100,
                            "minimum": 1,
                            "example": 10
                        }
                    },
                    {
                        "name": "shift",
                        "in": "query",
                        "description": "Filter by shift ID (24-char ObjectId)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "68625d39439bfd7a7402615c"
                        }
                    },
                    {
                        "name": "time_start",
                        "in": "query",
                        "description": "Period start (Y-m-d H:i:s). Required when time_end is set; must be before time_end",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "2025-05-01 00:00:00"
                        }
                    },
                    {
                        "name": "time_end",
                        "in": "query",
                        "description": "Period end (Y-m-d H:i:s). Required when time_start is set; must be after time_start",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "2025-05-07 23:59:59"
                        }
                    },
                    {
                        "name": "users[]",
                        "in": "query",
                        "description": "Filter by user IDs who created documents",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "example": "68625d39439bfd7a7402615b"
                            }
                        }
                    },
                    {
                        "name": "fiscal",
                        "in": "query",
                        "description": "Filter by fiscal document flag",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "example": true
                        }
                    },
                    {
                        "name": "payment",
                        "in": "query",
                        "description": "Filter by payment status (payments.paid)",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "example": true
                        }
                    },
                    {
                        "name": "product_id",
                        "in": "query",
                        "description": "Filter documents containing the given product",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "686261d6c288a7a7e308bf99"
                        }
                    },
                    {
                        "name": "state[]",
                        "in": "query",
                        "description": "Document state filter: 1, 2, 3, or 4",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer",
                                "enum": [
                                    1,
                                    2,
                                    3,
                                    4
                                ],
                                "example": 1
                            }
                        }
                    },
                    {
                        "name": "deleted",
                        "in": "query",
                        "description": "Include deleted documents when true",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "example": false
                        }
                    },
                    {
                        "name": "search_text",
                        "in": "query",
                        "description": "Text search in document number and comment",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "ADJ-100"
                        }
                    },
                    {
                        "name": "number",
                        "in": "query",
                        "description": "Search by document number (exact or regex)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "1001"
                        }
                    },
                    {
                        "name": "comment",
                        "in": "query",
                        "description": "Search by comment (regex)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "inventory"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "description": "Destination store or counterparty ID",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "686e41e1334591c53507fac9"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "description": "Source store or counterparty ID",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "686e41e1334591c53507fac8"
                        }
                    },
                    {
                        "name": "contractors[]",
                        "in": "query",
                        "description": "Filter by counterparty IDs (from/to)",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "example": "6895ebe3bd6637e139053e6a"
                            }
                        }
                    },
                    {
                        "name": "access_stores[]",
                        "in": "query",
                        "description": "Restrict results to allowed store IDs",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "example": "686e41e1334591c53507fac9"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of change documents retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "id": {
                                                "description": "Document identifier",
                                                "type": "string",
                                                "example": "686274c0baba51adda055e1f"
                                            },
                                            "uuid": {
                                                "description": "Document UUID",
                                                "type": "string",
                                                "example": "15a000bd-ab2b-4ec2-bc92-fe3c11ca62e1"
                                            },
                                            "name": {
                                                "description": "Display name (e.g. document number)",
                                                "type": "string",
                                                "example": "#1001"
                                            },
                                            "order_number": {
                                                "description": "Document number",
                                                "type": "string",
                                                "example": "1001"
                                            },
                                            "created_at": {
                                                "description": "Creation timestamp (ISO 8601)",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2025-05-01T12:00:00+00:00"
                                            },
                                            "updated_at": {
                                                "description": "Last update timestamp (ISO 8601)",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2025-05-01T12:05:00+00:00"
                                            },
                                            "processed_at": {
                                                "description": "Document date (ISO 8601)",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2025-05-01T12:00:00+00:00"
                                            },
                                            "financial_status": {
                                                "description": "Payment status: paid, partially_paid, pending",
                                                "type": "string",
                                                "example": "pending"
                                            },
                                            "total_price": {
                                                "description": "Total amount",
                                                "type": "string",
                                                "example": "0.00"
                                            },
                                            "note": {
                                                "description": "Document comment",
                                                "type": "string",
                                                "example": "Stock correction"
                                            },
                                            "location_id": {
                                                "description": "Store ID",
                                                "type": "string",
                                                "example": "686e41e1334591c53507fac9"
                                            },
                                            "user_id": {
                                                "description": "User who created the document",
                                                "type": "string",
                                                "example": "68625d39439bfd7a7402615b"
                                            },
                                            "line_items": {
                                                "description": "Document line items",
                                                "type": "array",
                                                "items": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "string",
                                                            "example": "686261d6c288a7a7e308bf99"
                                                        },
                                                        "title": {
                                                            "type": "string",
                                                            "example": "Product name"
                                                        },
                                                        "quantity": {
                                                            "type": "number",
                                                            "example": -1
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "source": {
                                                "description": "Source party (from)",
                                                "type": "object"
                                            },
                                            "destination": {
                                                "description": "Destination party (to)",
                                                "type": "object"
                                            },
                                            "document_flags": {
                                                "description": "status, state, deleted, calculated, accepted",
                                                "type": "object"
                                            },
                                            "metrics": {
                                                "description": "quantity, positions_count, etc.",
                                                "type": "object"
                                            },
                                            "timeline": {
                                                "description": "created_at, updated_at, processed_at timestamps",
                                                "type": "object"
                                            },
                                            "references": {
                                                "description": "store, shift_id, register_id, hash, app",
                                                "type": "object"
                                            },
                                            "actor": {
                                                "description": "User who performed the action (id, name, email, phone)",
                                                "type": "object"
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized access."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden - no permission or feature not available for the company",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/documents/sales": {
            "get": {
                "tags": [
                    "Document"
                ],
                "summary": "Get sales documents",
                "description": "Returns a paginated list of sales and return_sales documents. Pass include_inventory_movements=true to attach per-product inventory movements (qty, stock, cost) merged by document id; without it, only document headers are returned. When include_inventory_movements is true, filters are aligned: time_start/time_end (period), from or access_stores[0] (store), product_id, users/user (creator). If time_start and time_end are omitted, the last 7 days are used. When both dates are provided, the period must not exceed 31 days.",
                "operationId": "5c581ee9f6616c48a5fca7044a394504",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "description": "Pagination: number of records to skip",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 0,
                            "example": 0
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Pagination: number of records to return (1–100)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "maximum": 100,
                            "minimum": 1,
                            "example": 10
                        }
                    },
                    {
                        "name": "shift",
                        "in": "query",
                        "description": "Filter by shift ID (24-char ObjectId)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "68625d39439bfd7a7402615c"
                        }
                    },
                    {
                        "name": "time_start",
                        "in": "query",
                        "description": "Period start (Y-m-d H:i:s). Required when time_end is set; must be before time_end",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "2025-05-01 00:00:00"
                        }
                    },
                    {
                        "name": "time_end",
                        "in": "query",
                        "description": "Period end (Y-m-d H:i:s). Required when time_start is set; must be after time_start",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "2025-05-07 23:59:59"
                        }
                    },
                    {
                        "name": "users[]",
                        "in": "query",
                        "description": "Filter by user IDs who created documents",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "example": "68625d39439bfd7a7402615b"
                            }
                        }
                    },
                    {
                        "name": "fiscal",
                        "in": "query",
                        "description": "Filter by fiscal document flag",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "example": true
                        }
                    },
                    {
                        "name": "payment",
                        "in": "query",
                        "description": "Filter by payment status (payments.paid)",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "example": true
                        }
                    },
                    {
                        "name": "product_id",
                        "in": "query",
                        "description": "Filter documents containing the given product",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "686261d6c288a7a7e308bf99"
                        }
                    },
                    {
                        "name": "state[]",
                        "in": "query",
                        "description": "Document state filter: 1, 2, 3, or 4",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer",
                                "enum": [
                                    1,
                                    2,
                                    3,
                                    4
                                ],
                                "example": 1
                            }
                        }
                    },
                    {
                        "name": "deleted",
                        "in": "query",
                        "description": "Include deleted documents when true",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "example": false
                        }
                    },
                    {
                        "name": "search_text",
                        "in": "query",
                        "description": "Text search in document number and comment",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "INV-100"
                        }
                    },
                    {
                        "name": "number",
                        "in": "query",
                        "description": "Search by document number (exact or regex)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "1001"
                        }
                    },
                    {
                        "name": "comment",
                        "in": "query",
                        "description": "Search by comment (regex)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "delivery"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "description": "Destination store or counterparty ID",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "686e41e1334591c53507fac9"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "description": "Source store ID (for sales — warehouse/store). Used as store filter for inventory movements when include_inventory_movements=true",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "686e41e1334591c53507fac8"
                        }
                    },
                    {
                        "name": "contractors[]",
                        "in": "query",
                        "description": "Filter by counterparty IDs (from/to)",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "example": "6895ebe3bd6637e139053e6a"
                            }
                        }
                    },
                    {
                        "name": "access_stores[]",
                        "in": "query",
                        "description": "Restrict results to allowed store IDs. First value is used as store filter when from is omitted (only when include_inventory_movements=true)",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "example": "686e41e1334591c53507fac9"
                            }
                        }
                    },
                    {
                        "name": "include_inventory_movements",
                        "in": "query",
                        "description": "When true, fetches product-level inventory movements and attaches them as inventory_movements on each document. Omitted or false returns documents only.",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "example": true
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of sales documents; inventory_movements is present only when include_inventory_movements=true",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "id": {
                                                "description": "Document identifier",
                                                "type": "string",
                                                "example": "686274c0baba51adda055e1f"
                                            },
                                            "uuid": {
                                                "description": "Document UUID",
                                                "type": "string",
                                                "example": "15a000bd-ab2b-4ec2-bc92-fe3c11ca62e1"
                                            },
                                            "name": {
                                                "description": "Display name (e.g. document number)",
                                                "type": "string",
                                                "example": "#1001"
                                            },
                                            "order_number": {
                                                "description": "Document number",
                                                "type": "string",
                                                "example": "1001"
                                            },
                                            "created_at": {
                                                "description": "Creation timestamp (ISO 8601)",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2025-05-01T12:00:00+00:00"
                                            },
                                            "updated_at": {
                                                "description": "Last update timestamp (ISO 8601)",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2025-05-01T12:05:00+00:00"
                                            },
                                            "processed_at": {
                                                "description": "Document date (ISO 8601)",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2025-05-01T12:00:00+00:00"
                                            },
                                            "financial_status": {
                                                "description": "Payment status: paid, partially_paid, pending",
                                                "type": "string",
                                                "example": "paid"
                                            },
                                            "total_price": {
                                                "description": "Total amount",
                                                "type": "string",
                                                "example": "1500.00"
                                            },
                                            "subtotal_price": {
                                                "description": "Subtotal before discounts",
                                                "type": "string",
                                                "example": "1600.00"
                                            },
                                            "total_discounts": {
                                                "description": "Total discount amount",
                                                "type": "string",
                                                "example": "100.00"
                                            },
                                            "note": {
                                                "description": "Document comment",
                                                "type": "string",
                                                "example": "Counter sale"
                                            },
                                            "location_id": {
                                                "description": "Store ID",
                                                "type": "string",
                                                "example": "686e41e1334591c53507fac9"
                                            },
                                            "client_id": {
                                                "description": "Client ID",
                                                "type": "string",
                                                "example": "6895ebe3bd6637e139053e6a"
                                            },
                                            "user_id": {
                                                "description": "User who created the document",
                                                "type": "string",
                                                "example": "68625d39439bfd7a7402615b"
                                            },
                                            "line_items": {
                                                "description": "Document line items from the POS register. Legacy fields inside legacy_line (including cost) may be absent depending on the cashier role permissions at the time of sale — e.g. cost is omitted when the user has no catalog.fields.cost access. For reliable unit cost and stock data, request include_inventory_movements=true and use inventory_movements[].cost.",
                                                "type": "array",
                                                "items": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "string",
                                                            "example": "686261d6c288a7a7e308bf99"
                                                        },
                                                        "title": {
                                                            "type": "string",
                                                            "example": "Product name"
                                                        },
                                                        "sku": {
                                                            "type": "string",
                                                            "example": "SKU-001"
                                                        },
                                                        "quantity": {
                                                            "type": "number",
                                                            "example": 2
                                                        },
                                                        "price": {
                                                            "type": "string",
                                                            "example": "500.00"
                                                        },
                                                        "legacy_line": {
                                                            "description": "Raw POS line payload. May include cost and other register fields; not guaranteed — depends on cashier permissions and POS configuration.",
                                                            "type": "object"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "customer": {
                                                "description": "Customer / counterparty (destination)",
                                                "type": "object"
                                            },
                                            "source": {
                                                "description": "Source party (from)",
                                                "type": "object"
                                            },
                                            "destination": {
                                                "description": "Destination party (to)",
                                                "type": "object"
                                            },
                                            "payment_terms": {
                                                "description": "Payment flags and amounts",
                                                "type": "object"
                                            },
                                            "document_flags": {
                                                "description": "status, state, deleted, calculated, accepted",
                                                "type": "object"
                                            },
                                            "metrics": {
                                                "description": "quantity, discount_percent, paid_sum, etc.",
                                                "type": "object"
                                            },
                                            "timeline": {
                                                "description": "created_at, updated_at, processed_at timestamps",
                                                "type": "object"
                                            },
                                            "references": {
                                                "description": "store, shift_id, register_id, hash, app",
                                                "type": "object"
                                            },
                                            "actor": {
                                                "description": "User who performed the action (id, name, email, phone)",
                                                "type": "object"
                                            },
                                            "inventory_movements": {
                                                "description": "Present only when include_inventory_movements=true. Product-level inventory movements for this document, joined by document id. Preferred source for unit cost and stock balances. Nested doc object is omitted as duplicate of the parent document.",
                                                "type": "array",
                                                "items": {
                                                    "properties": {
                                                        "id": {
                                                            "description": "Movement identifier",
                                                            "type": "string",
                                                            "example": "69f9f200a7ca32b5ef01135f"
                                                        },
                                                        "qty": {
                                                            "description": "Movement quantity (negative for outbound sales)",
                                                            "type": "number",
                                                            "example": -2.28
                                                        },
                                                        "qty_before": {
                                                            "description": "Stock balance before the movement",
                                                            "type": "number",
                                                            "example": 142.615
                                                        },
                                                        "qty_after": {
                                                            "description": "Stock balance after the movement",
                                                            "type": "number",
                                                            "example": 140.335
                                                        },
                                                        "price": {
                                                            "description": "Sale price per unit from the register",
                                                            "type": "number",
                                                            "example": 600
                                                        },
                                                        "cost": {
                                                            "description": "Unit cost from inventory movements. Authoritative cost field when include_inventory_movements=true; omitted if the API token role lacks catalog.fields.cost permission.",
                                                            "type": "number",
                                                            "example": 500
                                                        },
                                                        "stock": {
                                                            "description": "Stock levels per store after the movement {storeId: qty}",
                                                            "type": "object",
                                                            "example": {
                                                                "67a44a5f66dac33efc08aa8b": 35.43,
                                                                "67c2d49e0b68a2259408324a": 69.56
                                                            }
                                                        },
                                                        "user_id": {
                                                            "description": "User who created the movement",
                                                            "type": "string",
                                                            "example": "67a49e4b149a37634f0b40be"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized access."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden - no permission or feature not available for the company",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/documents/purchases": {
            "get": {
                "tags": [
                    "Document"
                ],
                "summary": "Get purchase documents",
                "description": "Returns a paginated list of purchase documents for the company from the access token. If time_start and time_end are omitted, the last 7 days are used. When both dates are provided, the period must not exceed 31 days. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "630ed9d2d63edf0df77ff2d741ddcdde",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "description": "Pagination: number of records to skip",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 0,
                            "example": 0
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Pagination: number of records to return (1–100)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "maximum": 100,
                            "minimum": 1,
                            "example": 10
                        }
                    },
                    {
                        "name": "shift",
                        "in": "query",
                        "description": "Filter by shift ID (24-char ObjectId)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "68625d39439bfd7a7402615c"
                        }
                    },
                    {
                        "name": "time_start",
                        "in": "query",
                        "description": "Period start (Y-m-d H:i:s). Required when time_end is set; must be before time_end",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "2025-05-01 00:00:00"
                        }
                    },
                    {
                        "name": "time_end",
                        "in": "query",
                        "description": "Period end (Y-m-d H:i:s). Required when time_start is set; must be after time_start",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "2025-05-07 23:59:59"
                        }
                    },
                    {
                        "name": "users[]",
                        "in": "query",
                        "description": "Filter by user IDs who created documents",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "example": "68625d39439bfd7a7402615b"
                            }
                        }
                    },
                    {
                        "name": "fiscal",
                        "in": "query",
                        "description": "Filter by fiscal document flag",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "example": true
                        }
                    },
                    {
                        "name": "payment",
                        "in": "query",
                        "description": "Filter by payment status (payments.paid)",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "example": true
                        }
                    },
                    {
                        "name": "product_id",
                        "in": "query",
                        "description": "Filter documents containing the given product",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "686261d6c288a7a7e308bf99"
                        }
                    },
                    {
                        "name": "state[]",
                        "in": "query",
                        "description": "Document state filter: 1, 2, 3, or 4",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer",
                                "enum": [
                                    1,
                                    2,
                                    3,
                                    4
                                ],
                                "example": 1
                            }
                        }
                    },
                    {
                        "name": "deleted",
                        "in": "query",
                        "description": "Include deleted documents when true",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "example": false
                        }
                    },
                    {
                        "name": "search_text",
                        "in": "query",
                        "description": "Text search in document number and comment",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "INV-100"
                        }
                    },
                    {
                        "name": "number",
                        "in": "query",
                        "description": "Search by document number (exact or regex)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "1001"
                        }
                    },
                    {
                        "name": "comment",
                        "in": "query",
                        "description": "Search by comment (regex)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "supplier"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "description": "Destination store or counterparty ID",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "686e41e1334591c53507fac9"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "description": "Source store or counterparty ID",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "686e41e1334591c53507fac8"
                        }
                    },
                    {
                        "name": "contractors[]",
                        "in": "query",
                        "description": "Filter by counterparty IDs (from/to)",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "example": "6895ebe3bd6637e139053e6a"
                            }
                        }
                    },
                    {
                        "name": "access_stores[]",
                        "in": "query",
                        "description": "Restrict results to allowed store IDs",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "example": "686e41e1334591c53507fac9"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of purchase documents retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "id": {
                                                "description": "Document identifier",
                                                "type": "string",
                                                "example": "686274c0baba51adda055e1f"
                                            },
                                            "uuid": {
                                                "description": "Document UUID",
                                                "type": "string",
                                                "example": "15a000bd-ab2b-4ec2-bc92-fe3c11ca62e1"
                                            },
                                            "name": {
                                                "description": "Display name (e.g. document number)",
                                                "type": "string",
                                                "example": "#1001"
                                            },
                                            "order_number": {
                                                "description": "Document number",
                                                "type": "string",
                                                "example": "1001"
                                            },
                                            "created_at": {
                                                "description": "Creation timestamp (ISO 8601)",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2025-05-01T12:00:00+00:00"
                                            },
                                            "updated_at": {
                                                "description": "Last update timestamp (ISO 8601)",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2025-05-01T12:05:00+00:00"
                                            },
                                            "processed_at": {
                                                "description": "Document date (ISO 8601)",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2025-05-01T12:00:00+00:00"
                                            },
                                            "financial_status": {
                                                "description": "Payment status: paid, partially_paid, pending",
                                                "type": "string",
                                                "example": "paid"
                                            },
                                            "total_price": {
                                                "description": "Total amount",
                                                "type": "string",
                                                "example": "1500.00"
                                            },
                                            "subtotal_price": {
                                                "description": "Subtotal before discounts",
                                                "type": "string",
                                                "example": "1600.00"
                                            },
                                            "total_discounts": {
                                                "description": "Total discount amount",
                                                "type": "string",
                                                "example": "100.00"
                                            },
                                            "note": {
                                                "description": "Document comment",
                                                "type": "string",
                                                "example": "Supplier delivery"
                                            },
                                            "location_id": {
                                                "description": "Store ID",
                                                "type": "string",
                                                "example": "686e41e1334591c53507fac9"
                                            },
                                            "client_id": {
                                                "description": "Client ID",
                                                "type": "string",
                                                "example": "6895ebe3bd6637e139053e6a"
                                            },
                                            "user_id": {
                                                "description": "User who created the document",
                                                "type": "string",
                                                "example": "68625d39439bfd7a7402615b"
                                            },
                                            "line_items": {
                                                "description": "Document line items",
                                                "type": "array",
                                                "items": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "string",
                                                            "example": "686261d6c288a7a7e308bf99"
                                                        },
                                                        "title": {
                                                            "type": "string",
                                                            "example": "Product name"
                                                        },
                                                        "sku": {
                                                            "type": "string",
                                                            "example": "SKU-001"
                                                        },
                                                        "quantity": {
                                                            "type": "number",
                                                            "example": 2
                                                        },
                                                        "price": {
                                                            "type": "string",
                                                            "example": "500.00"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "customer": {
                                                "description": "Customer / counterparty (destination)",
                                                "type": "object"
                                            },
                                            "source": {
                                                "description": "Source party (from)",
                                                "type": "object"
                                            },
                                            "destination": {
                                                "description": "Destination party (to)",
                                                "type": "object"
                                            },
                                            "payment_terms": {
                                                "description": "Payment flags and amounts",
                                                "type": "object"
                                            },
                                            "document_flags": {
                                                "description": "status, state, deleted, calculated, accepted",
                                                "type": "object"
                                            },
                                            "metrics": {
                                                "description": "quantity, discount_percent, paid_sum, etc.",
                                                "type": "object"
                                            },
                                            "timeline": {
                                                "description": "created_at, updated_at, processed_at timestamps",
                                                "type": "object"
                                            },
                                            "references": {
                                                "description": "store, shift_id, register_id, hash, app",
                                                "type": "object"
                                            },
                                            "actor": {
                                                "description": "User who performed the action (id, name, email, phone)",
                                                "type": "object"
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized access."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden - no permission or feature not available for the company",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/documents/return": {
            "get": {
                "tags": [
                    "Document"
                ],
                "summary": "Get return documents",
                "description": "Returns a paginated list of return documents (sales returns or purchase returns). The type query parameter is required. If time_start and time_end are omitted, the last 7 days are used. When both dates are provided, the period must not exceed 31 days. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "2af9cdb84e1691f4c633b201f0959f1d",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Return document kind: sales (return_sales) or purchases (return_purchases)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "sales",
                                "purchases"
                            ],
                            "example": "sales"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "description": "Pagination: number of records to skip",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 0,
                            "example": 0
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Pagination: number of records to return (1–100)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "maximum": 100,
                            "minimum": 1,
                            "example": 10
                        }
                    },
                    {
                        "name": "shift",
                        "in": "query",
                        "description": "Filter by shift ID (24-char ObjectId)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "68625d39439bfd7a7402615c"
                        }
                    },
                    {
                        "name": "time_start",
                        "in": "query",
                        "description": "Period start (Y-m-d H:i:s). Required when time_end is set; must be before time_end",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "2025-05-01 00:00:00"
                        }
                    },
                    {
                        "name": "time_end",
                        "in": "query",
                        "description": "Period end (Y-m-d H:i:s). Required when time_start is set; must be after time_start",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "2025-05-07 23:59:59"
                        }
                    },
                    {
                        "name": "users[]",
                        "in": "query",
                        "description": "Filter by user IDs who created documents",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "example": "68625d39439bfd7a7402615b"
                            }
                        }
                    },
                    {
                        "name": "fiscal",
                        "in": "query",
                        "description": "Filter by fiscal document flag",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "example": true
                        }
                    },
                    {
                        "name": "payment",
                        "in": "query",
                        "description": "Filter by payment status (payments.paid)",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "example": true
                        }
                    },
                    {
                        "name": "product_id",
                        "in": "query",
                        "description": "Filter documents containing the given product",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "686261d6c288a7a7e308bf99"
                        }
                    },
                    {
                        "name": "state[]",
                        "in": "query",
                        "description": "Document state filter: 1, 2, 3, or 4",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer",
                                "enum": [
                                    1,
                                    2,
                                    3,
                                    4
                                ],
                                "example": 1
                            }
                        }
                    },
                    {
                        "name": "deleted",
                        "in": "query",
                        "description": "Include deleted documents when true",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "example": false
                        }
                    },
                    {
                        "name": "search_text",
                        "in": "query",
                        "description": "Text search in document number and comment",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "RET-100"
                        }
                    },
                    {
                        "name": "number",
                        "in": "query",
                        "description": "Search by document number (exact or regex)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "1001"
                        }
                    },
                    {
                        "name": "comment",
                        "in": "query",
                        "description": "Search by comment (regex)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "return"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "description": "Destination store or counterparty ID",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "686e41e1334591c53507fac9"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "description": "Source store or counterparty ID",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "686e41e1334591c53507fac8"
                        }
                    },
                    {
                        "name": "contractors[]",
                        "in": "query",
                        "description": "Filter by counterparty IDs (from/to)",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "example": "6895ebe3bd6637e139053e6a"
                            }
                        }
                    },
                    {
                        "name": "access_stores[]",
                        "in": "query",
                        "description": "Restrict results to allowed store IDs",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "example": "686e41e1334591c53507fac9"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of return documents retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "id": {
                                                "description": "Document identifier",
                                                "type": "string",
                                                "example": "686274c0baba51adda055e1f"
                                            },
                                            "uuid": {
                                                "description": "Document UUID",
                                                "type": "string",
                                                "example": "15a000bd-ab2b-4ec2-bc92-fe3c11ca62e1"
                                            },
                                            "name": {
                                                "description": "Display name (e.g. document number)",
                                                "type": "string",
                                                "example": "#1001"
                                            },
                                            "order_number": {
                                                "description": "Document number",
                                                "type": "string",
                                                "example": "1001"
                                            },
                                            "created_at": {
                                                "description": "Creation timestamp (ISO 8601)",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2025-05-01T12:00:00+00:00"
                                            },
                                            "updated_at": {
                                                "description": "Last update timestamp (ISO 8601)",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2025-05-01T12:05:00+00:00"
                                            },
                                            "processed_at": {
                                                "description": "Document date (ISO 8601)",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2025-05-01T12:00:00+00:00"
                                            },
                                            "financial_status": {
                                                "description": "Payment status: paid, partially_paid, pending",
                                                "type": "string",
                                                "example": "paid"
                                            },
                                            "total_price": {
                                                "description": "Total amount",
                                                "type": "string",
                                                "example": "500.00"
                                            },
                                            "note": {
                                                "description": "Document comment",
                                                "type": "string",
                                                "example": "Customer return"
                                            },
                                            "location_id": {
                                                "description": "Store ID",
                                                "type": "string",
                                                "example": "686e41e1334591c53507fac9"
                                            },
                                            "client_id": {
                                                "description": "Client ID",
                                                "type": "string",
                                                "example": "6895ebe3bd6637e139053e6a"
                                            },
                                            "user_id": {
                                                "description": "User who created the document",
                                                "type": "string",
                                                "example": "68625d39439bfd7a7402615b"
                                            },
                                            "line_items": {
                                                "description": "Document line items",
                                                "type": "array",
                                                "items": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "string",
                                                            "example": "686261d6c288a7a7e308bf99"
                                                        },
                                                        "title": {
                                                            "type": "string",
                                                            "example": "Product name"
                                                        },
                                                        "quantity": {
                                                            "type": "number",
                                                            "example": 1
                                                        },
                                                        "price": {
                                                            "type": "string",
                                                            "example": "500.00"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "customer": {
                                                "description": "Customer / counterparty (destination)",
                                                "type": "object"
                                            },
                                            "source": {
                                                "description": "Source party (from)",
                                                "type": "object"
                                            },
                                            "destination": {
                                                "description": "Destination party (to)",
                                                "type": "object"
                                            },
                                            "payment_terms": {
                                                "description": "Payment flags and amounts",
                                                "type": "object"
                                            },
                                            "document_flags": {
                                                "description": "status, state, deleted, calculated, accepted",
                                                "type": "object"
                                            },
                                            "metrics": {
                                                "description": "quantity, discount_percent, paid_sum, etc.",
                                                "type": "object"
                                            },
                                            "timeline": {
                                                "description": "created_at, updated_at, processed_at timestamps",
                                                "type": "object"
                                            },
                                            "references": {
                                                "description": "store, shift_id, register_id, hash, app",
                                                "type": "object"
                                            },
                                            "actor": {
                                                "description": "User who performed the action (id, name, email, phone)",
                                                "type": "object"
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized access."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden - no permission or feature not available for the company",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error (e.g. missing or invalid type)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "type": "object",
                                            "example": {
                                                "type": [
                                                    "The type field is required."
                                                ]
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/product/{product}": {
            "get": {
                "tags": [
                    "Product"
                ],
                "summary": "Get product",
                "description": "Get product by token. Required fields are marked with an asterisk (*) in the documented schema. The product catalog for this endpoint is reconciled with the remote source at most once every 3 minutes per company (per-route refresh window).",
                "operationId": "1ae7d8d98087b019cf935c3f6abfd32e",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    },
                    {
                        "name": "product",
                        "in": "path",
                        "description": "Product ID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "686261d7c288a7a7e308c3e4"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Product retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "description": "Unique product identifier",
                                            "type": "string",
                                            "example": "6993672cb2b05876ed033b78"
                                        },
                                        "published_at": {
                                            "description": "Date and time when the product was published",
                                            "type": "string",
                                            "format": "date-time",
                                            "example": "2026-02-16 18:51:24"
                                        },
                                        "updated_at": {
                                            "description": "Date and time of the last product update",
                                            "type": "string",
                                            "format": "date-time",
                                            "example": "2026-02-16 18:55:12"
                                        },
                                        "options": {
                                            "description": "General product information",
                                            "properties": {
                                                "id": {
                                                    "description": "Product identifier",
                                                    "type": "string",
                                                    "example": "6993672cb2b05876ed033b78"
                                                },
                                                "uuid": {
                                                    "description": "Product UUID",
                                                    "type": "string",
                                                    "example": "739844d3-55ef-4f34-ad74-9028d23e0f8f"
                                                },
                                                "name": {
                                                    "description": "Product name",
                                                    "type": "string",
                                                    "example": "TEST"
                                                },
                                                "description": {
                                                    "description": "Product description (can be null)",
                                                    "type": "string",
                                                    "example": "Description Test",
                                                    "nullable": true
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "is_variable": {
                                            "description": "Whether the product has variations",
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "variation": {
                                            "description": "Current product variation (null if the product is not variable)",
                                            "properties": {
                                                "id": {
                                                    "description": "Variation identifier",
                                                    "type": "string",
                                                    "example": "236b3743-8cc0-48a2-878a-8af3f68125c5"
                                                },
                                                "name": {
                                                    "description": "Variation name",
                                                    "type": "string",
                                                    "example": "Product #11"
                                                },
                                                "property": {
                                                    "description": "Variation attributes (e.g. size, color)",
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "key": {
                                                                "description": "Attribute name",
                                                                "type": "string",
                                                                "example": "Size"
                                                            },
                                                            "value": {
                                                                "description": "Attribute value",
                                                                "type": "string",
                                                                "example": "30"
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object",
                                            "nullable": true
                                        },
                                        "sku": {
                                            "description": "Stock Keeping Unit identifier",
                                            "type": "string",
                                            "example": "P-NO11"
                                        },
                                        "barcode": {
                                            "description": "Product barcode",
                                            "type": "string",
                                            "example": "2001725000007"
                                        },
                                        "plu_code": {
                                            "description": "PLU (Price Look-Up) code when present in the catalog (mapped from source field PLU_code). Often used for weighed or scale-labelled items; null if not set.",
                                            "type": "string",
                                            "example": "2100123456789",
                                            "nullable": true
                                        },
                                        "code": {
                                            "description": "Internal product code",
                                            "type": "string",
                                            "example": "01726"
                                        },
                                        "weight": {
                                            "description": "Product weight in kilograms",
                                            "type": "number",
                                            "format": "float",
                                            "example": 1.6
                                        },
                                        "dimensions": {
                                            "description": "Product dimensions in centimeters",
                                            "properties": {
                                                "length": {
                                                    "description": "Length (cm)",
                                                    "type": "integer",
                                                    "example": 20
                                                },
                                                "width": {
                                                    "description": "Width (cm)",
                                                    "type": "integer",
                                                    "example": 20
                                                },
                                                "height": {
                                                    "description": "Height (cm)",
                                                    "type": "integer",
                                                    "example": 20
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "price": {
                                            "description": "Product price",
                                            "type": "number",
                                            "example": 500
                                        },
                                        "discount": {
                                            "description": "Discount amount",
                                            "type": "number",
                                            "example": 0
                                        },
                                        "stock": {
                                            "description": "Stock quantity keyed by store ID (key — store ID, value — quantity). Stores with 0 stock are not included.",
                                            "type": "object",
                                            "additionalProperties": {
                                                "type": "integer",
                                                "example": 99
                                            }
                                        },
                                        "in_stock": {
                                            "description": "Whether the product is available in at least one store",
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "tags": {
                                            "description": "Ainur category list (categories[]) mapped to ext-tags and synced as tags in WooCommerce and Shopify",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "Five"
                                            }
                                        },
                                        "category_id": {
                                            "description": "Category identifier (null if not assigned)",
                                            "type": "string",
                                            "example": "691f0a633bfaae47d60b2129",
                                            "nullable": true
                                        },
                                        "img": {
                                            "description": "List of product image URLs",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "format": "uri",
                                                "example": "https://i1.ainur.app/v2/16077fcd-0799-4c31-b8a4-dcd03062aa18.jpg"
                                            }
                                        },
                                        "components": {
                                            "description": "Components included in the product (for bundles/sets)",
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "description": "Component identifier",
                                                        "type": "string",
                                                        "example": "691f0b1faea43ad2f7083766"
                                                    },
                                                    "exist": {
                                                        "description": "Whether the component exists in the system",
                                                        "type": "boolean",
                                                        "example": true
                                                    },
                                                    "name": {
                                                        "description": "Component name",
                                                        "type": "string",
                                                        "example": "Set #10"
                                                    },
                                                    "price": {
                                                        "description": "Current component price",
                                                        "type": "number",
                                                        "example": 500
                                                    },
                                                    "originPrice": {
                                                        "description": "Original component price without discount",
                                                        "type": "number",
                                                        "example": 500
                                                    },
                                                    "weight": {
                                                        "description": "Component weight in kilograms",
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 0.5005
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Products not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Products not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/product/ext-categories": {
            "get": {
                "tags": [
                    "Product"
                ],
                "summary": "Get categories",
                "description": "Get categories by token. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "48cbf81233b70150ddff437a4b8a48bc",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of categories retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "id": {
                                                "description": "Unique category identifier",
                                                "type": "string",
                                                "example": "691f0a633bfaae47d60b2129"
                                            },
                                            "uuid": {
                                                "description": "Category UUID",
                                                "type": "string",
                                                "example": "93577059-7ad0-42f1-8d8d-fe1f8f46404b"
                                            },
                                            "name": {
                                                "description": "Category name",
                                                "type": "string",
                                                "example": "Woo Group 20/11/2025"
                                            },
                                            "parent_id": {
                                                "description": "Parent category ID",
                                                "type": "string",
                                                "example": "691f0a633bfaae47d60b2128"
                                            },
                                            "parent_uuid": {
                                                "description": "Parent category UUID",
                                                "type": "string",
                                                "example": "93577059-7ad0-42f1-8d8d-fe1f8f46404a"
                                            },
                                            "created_at": {
                                                "description": "Date and time when the category was created",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2025-11-20 12:32:35"
                                            },
                                            "updated_at": {
                                                "description": "Date and time of the last category update",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2025-11-20 12:32:35"
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/product/deleted": {
            "get": {
                "tags": [
                    "Product"
                ],
                "summary": "Gettings deleted products",
                "description": "Get product by token. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "c59506aed68622e48a0488e4b2850840",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    },
                    {
                        "name": "start_time",
                        "in": "query",
                        "description": "Start of updated date range (format: Y-m-d H:i:s)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2004-01-10 00:00:00"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of deleted products retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "id": {
                                                "description": "Unique product identifier",
                                                "type": "string",
                                                "example": "6993672cb2b05876ed033b78"
                                            },
                                            "published_at": {
                                                "description": "Date and time when the product was published",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2026-02-16 18:51:24"
                                            },
                                            "updated_at": {
                                                "description": "Date and time of the last product update",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2026-02-16 18:55:12"
                                            },
                                            "options": {
                                                "description": "General product information",
                                                "properties": {
                                                    "id": {
                                                        "description": "Product identifier",
                                                        "type": "string",
                                                        "example": "6993672cb2b05876ed033b78"
                                                    },
                                                    "uuid": {
                                                        "description": "Product UUID",
                                                        "type": "string",
                                                        "example": "739844d3-55ef-4f34-ad74-9028d23e0f8f"
                                                    },
                                                    "name": {
                                                        "description": "Product name",
                                                        "type": "string",
                                                        "example": "TEST"
                                                    },
                                                    "description": {
                                                        "description": "Product description (can be null)",
                                                        "type": "string",
                                                        "example": "Description Test",
                                                        "nullable": true
                                                    }
                                                },
                                                "type": "object"
                                            },
                                            "is_variable": {
                                                "description": "Whether the product has variations",
                                                "type": "boolean",
                                                "example": false
                                            },
                                            "variation": {
                                                "description": "Current product variation (null if the product is not variable)",
                                                "properties": {
                                                    "id": {
                                                        "description": "Variation identifier",
                                                        "type": "string",
                                                        "example": "236b3743-8cc0-48a2-878a-8af3f68125c5"
                                                    },
                                                    "name": {
                                                        "description": "Variation name",
                                                        "type": "string",
                                                        "example": "Product #11"
                                                    },
                                                    "property": {
                                                        "description": "Variation attributes (e.g. size, color)",
                                                        "type": "array",
                                                        "items": {
                                                            "properties": {
                                                                "key": {
                                                                    "description": "Attribute name",
                                                                    "type": "string",
                                                                    "example": "Size"
                                                                },
                                                                "value": {
                                                                    "description": "Attribute value",
                                                                    "type": "string",
                                                                    "example": "30"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    }
                                                },
                                                "type": "object",
                                                "nullable": true
                                            },
                                            "sku": {
                                                "description": "Stock Keeping Unit identifier",
                                                "type": "string",
                                                "example": "P-NO11"
                                            },
                                            "barcode": {
                                                "description": "Product barcode",
                                                "type": "string",
                                                "example": "2001725000007"
                                            },
                                            "plu_code": {
                                                "description": "PLU (Price Look-Up) code when present in the catalog (mapped from source field PLU_code). Often used for weighed or scale-labelled items; null if not set.",
                                                "type": "string",
                                                "example": "2100123456789",
                                                "nullable": true
                                            },
                                            "code": {
                                                "description": "Internal product code",
                                                "type": "string",
                                                "example": "01726"
                                            },
                                            "weight": {
                                                "description": "Product weight in kilograms",
                                                "type": "number",
                                                "format": "float",
                                                "example": 1.6
                                            },
                                            "dimensions": {
                                                "description": "Product dimensions in centimeters",
                                                "properties": {
                                                    "length": {
                                                        "description": "Length (cm)",
                                                        "type": "integer",
                                                        "example": 20
                                                    },
                                                    "width": {
                                                        "description": "Width (cm)",
                                                        "type": "integer",
                                                        "example": 20
                                                    },
                                                    "height": {
                                                        "description": "Height (cm)",
                                                        "type": "integer",
                                                        "example": 20
                                                    }
                                                },
                                                "type": "object"
                                            },
                                            "price": {
                                                "description": "Product price",
                                                "type": "number",
                                                "example": 500
                                            },
                                            "discount": {
                                                "description": "Discount amount",
                                                "type": "number",
                                                "example": 0
                                            },
                                            "stock": {
                                                "description": "Stock quantity keyed by store ID (key — store ID, value — quantity). Stores with 0 stock are not included.",
                                                "type": "object",
                                                "additionalProperties": {
                                                    "type": "integer",
                                                    "example": 99
                                                }
                                            },
                                            "in_stock": {
                                                "description": "Whether the product is available in at least one store",
                                                "type": "boolean",
                                                "example": false
                                            },
                                            "tags": {
                                                "description": "Ainur category list (categories[]) mapped to ext-tags and synced as tags in WooCommerce and Shopify",
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "example": "Five"
                                                }
                                            },
                                            "category_id": {
                                                "description": "Ainur group identifier (_parent) mapped to ext-category and synced as category/collection in WooCommerce and Shopify (null if not assigned)",
                                                "type": "string",
                                                "example": "691f0a633bfaae47d60b2129",
                                                "nullable": true
                                            },
                                            "img": {
                                                "description": "List of product image URLs",
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "format": "uri",
                                                    "example": "https://i1.ainur.app/v2/16077fcd-0799-4c31-b8a4-dcd03062aa18.jpg"
                                                }
                                            },
                                            "components": {
                                                "description": "Components included in the product (for bundles/sets)",
                                                "type": "array",
                                                "items": {
                                                    "properties": {
                                                        "id": {
                                                            "description": "Component identifier",
                                                            "type": "string",
                                                            "example": "691f0b1faea43ad2f7083766"
                                                        },
                                                        "exist": {
                                                            "description": "Whether the component exists in the system",
                                                            "type": "boolean",
                                                            "example": true
                                                        },
                                                        "name": {
                                                            "description": "Component name",
                                                            "type": "string",
                                                            "example": "Set #10"
                                                        },
                                                        "price": {
                                                            "description": "Current component price",
                                                            "type": "number",
                                                            "example": 500
                                                        },
                                                        "originPrice": {
                                                            "description": "Original component price without discount",
                                                            "type": "number",
                                                            "example": 500
                                                        },
                                                        "weight": {
                                                            "description": "Component weight in kilograms",
                                                            "type": "number",
                                                            "format": "float",
                                                            "example": 0.5005
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/product": {
            "get": {
                "tags": [
                    "Product"
                ],
                "summary": "Gettings product",
                "description": "Get product by token. Required fields are marked with an asterisk (*) in the documented schema. The product catalog for this endpoint is reconciled with the remote source at most once every 3 minutes per company (per-route refresh window).",
                "operationId": "0a8c9d90ef293720b6b03010bd73911b",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "description": "Offset for pagination (min: 0)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 0,
                            "example": 0
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Products per page (1–1000)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "maximum": 1000,
                            "minimum": 1,
                            "example": 100
                        }
                    },
                    {
                        "name": "ids[]",
                        "in": "query",
                        "description": "Product IDs (array of strings)",
                        "required": false,
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "maxLength": 255,
                                "example": "5f2b1a2b3c4d5e6f7a8b9c0d"
                            }
                        }
                    },
                    {
                        "name": "min_price",
                        "in": "query",
                        "description": "Minimum price (>= 0)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 0,
                            "example": 1000
                        }
                    },
                    {
                        "name": "max_price",
                        "in": "query",
                        "description": "Maximum price (>= 0)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 0,
                            "example": 5000
                        }
                    },
                    {
                        "name": "updated_start",
                        "in": "query",
                        "description": "Start of updated date range (format: Y-m-d H:i:s). Must be before or equal to updated_end.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2004-01-10 00:00:00"
                        }
                    },
                    {
                        "name": "updated_end",
                        "in": "query",
                        "description": "End of updated date range (format: Y-m-d H:i:s). Must be after or equal to updated_start.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2025-08-01 00:00:00"
                        }
                    },
                    {
                        "name": "store_id",
                        "in": "query",
                        "description": "The ID of the store (24-character hexadecimal string) for which the stock should be checked.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "68625d9dd51ba52ff809a445"
                        }
                    },
                    {
                        "name": "ext-tag",
                        "in": "query",
                        "description": "Optional filter: restrict results to products that have this Ainur category label as an ext-tag. Use the same human-readable names as returned by GET /product/ext-tags (e.g. Five, Woo). In responses this maps to the product `tags` array (synced to tags in WooCommerce and Shopify). Omit this parameter to list products without filtering by tag. Maximum length 255 characters.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "maxLength": 255,
                            "example": "Five"
                        }
                    },
                    {
                        "name": "min_stock",
                        "in": "query",
                        "description": "Minimum stock value. Can only be provided together with store_id. Must be an integer greater than or equal to 0.",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 0,
                            "example": 0
                        }
                    },
                    {
                        "name": "max_stock",
                        "in": "query",
                        "description": "Maximum stock value. Can only be provided together with store_id. Must be an integer greater than or equal to 0.",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 0,
                            "example": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of products retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "id": {
                                                "description": "Unique product identifier",
                                                "type": "string",
                                                "example": "6993672cb2b05876ed033b78"
                                            },
                                            "published_at": {
                                                "description": "Date and time when the product was published",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2026-02-16 18:51:24"
                                            },
                                            "updated_at": {
                                                "description": "Date and time of the last product update",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2026-02-16 18:55:12"
                                            },
                                            "options": {
                                                "description": "General product information",
                                                "properties": {
                                                    "id": {
                                                        "description": "Product identifier",
                                                        "type": "string",
                                                        "example": "6993672cb2b05876ed033b78"
                                                    },
                                                    "uuid": {
                                                        "description": "Product UUID",
                                                        "type": "string",
                                                        "example": "739844d3-55ef-4f34-ad74-9028d23e0f8f"
                                                    },
                                                    "name": {
                                                        "description": "Product name",
                                                        "type": "string",
                                                        "example": "TEST"
                                                    },
                                                    "description": {
                                                        "description": "Product description (can be null)",
                                                        "type": "string",
                                                        "example": "Description Test",
                                                        "nullable": true
                                                    }
                                                },
                                                "type": "object"
                                            },
                                            "is_variable": {
                                                "description": "Whether the product has variations",
                                                "type": "boolean",
                                                "example": true
                                            },
                                            "variation": {
                                                "description": "Current product variation (null if the product is not variable)",
                                                "properties": {
                                                    "id": {
                                                        "description": "Variation identifier",
                                                        "type": "string",
                                                        "example": "236b3743-8cc0-48a2-878a-8af3f68125c5"
                                                    },
                                                    "name": {
                                                        "description": "Variation name",
                                                        "type": "string",
                                                        "example": "Product #11"
                                                    },
                                                    "property": {
                                                        "description": "Variation attributes (e.g. size, color)",
                                                        "type": "array",
                                                        "items": {
                                                            "properties": {
                                                                "key": {
                                                                    "description": "Attribute name",
                                                                    "type": "string",
                                                                    "example": "Size"
                                                                },
                                                                "value": {
                                                                    "description": "Attribute value",
                                                                    "type": "string",
                                                                    "example": "30"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    }
                                                },
                                                "type": "object",
                                                "nullable": true
                                            },
                                            "sku": {
                                                "description": "Stock Keeping Unit identifier",
                                                "type": "string",
                                                "example": "P-NO11"
                                            },
                                            "barcode": {
                                                "description": "Product barcode",
                                                "type": "string",
                                                "example": "2001725000007"
                                            },
                                            "plu_code": {
                                                "description": "PLU (Price Look-Up) code when present in the catalog (mapped from source field PLU_code). Often used for weighed or scale-labelled items; null if not set.",
                                                "type": "string",
                                                "example": "2100123456789",
                                                "nullable": true
                                            },
                                            "code": {
                                                "description": "Internal product code",
                                                "type": "string",
                                                "example": "01726"
                                            },
                                            "weight": {
                                                "description": "Product weight in kilograms",
                                                "type": "number",
                                                "format": "float",
                                                "example": 1.6
                                            },
                                            "dimensions": {
                                                "description": "Product dimensions in centimeters",
                                                "properties": {
                                                    "length": {
                                                        "description": "Length (cm)",
                                                        "type": "integer",
                                                        "example": 20
                                                    },
                                                    "width": {
                                                        "description": "Width (cm)",
                                                        "type": "integer",
                                                        "example": 20
                                                    },
                                                    "height": {
                                                        "description": "Height (cm)",
                                                        "type": "integer",
                                                        "example": 20
                                                    }
                                                },
                                                "type": "object"
                                            },
                                            "price": {
                                                "description": "Product price",
                                                "type": "number",
                                                "example": 500
                                            },
                                            "discount": {
                                                "description": "Discount amount",
                                                "type": "number",
                                                "example": 0
                                            },
                                            "stock": {
                                                "description": "Stock quantity keyed by store ID (key — store ID, value — quantity). Stores with 0 stock are not included.",
                                                "type": "object",
                                                "additionalProperties": {
                                                    "type": "integer",
                                                    "example": 99
                                                }
                                            },
                                            "in_stock": {
                                                "description": "Whether the product is available in at least one store",
                                                "type": "boolean",
                                                "example": false
                                            },
                                            "tags": {
                                                "description": "Ainur category list (categories[]) mapped to ext-tags and synced as tags in WooCommerce and Shopify",
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "example": "Five"
                                                }
                                            },
                                            "category_id": {
                                                "description": "Ainur group identifier (_parent) mapped to ext-category and synced as category/collection in WooCommerce and Shopify (null if not assigned)",
                                                "type": "string",
                                                "example": "691f0a633bfaae47d60b2129",
                                                "nullable": true
                                            },
                                            "img": {
                                                "description": "List of product image URLs",
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "format": "uri",
                                                    "example": "https://i1.ainur.app/v2/16077fcd-0799-4c31-b8a4-dcd03062aa18.jpg"
                                                }
                                            },
                                            "components": {
                                                "description": "Components included in the product (for bundles/sets)",
                                                "type": "array",
                                                "items": {
                                                    "properties": {
                                                        "id": {
                                                            "description": "Component identifier",
                                                            "type": "string",
                                                            "example": "691f0b1faea43ad2f7083766"
                                                        },
                                                        "exist": {
                                                            "description": "Whether the component exists in the system",
                                                            "type": "boolean",
                                                            "example": true
                                                        },
                                                        "name": {
                                                            "description": "Component name",
                                                            "type": "string",
                                                            "example": "Set #10"
                                                        },
                                                        "price": {
                                                            "description": "Current component price",
                                                            "type": "number",
                                                            "example": 500
                                                        },
                                                        "originPrice": {
                                                            "description": "Original component price without discount",
                                                            "type": "number",
                                                            "example": 500
                                                        },
                                                        "weight": {
                                                            "description": "Component weight in kilograms",
                                                            "type": "number",
                                                            "format": "float",
                                                            "example": 0.5005
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Store not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Store not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/product/ext-tags": {
            "get": {
                "tags": [
                    "Product"
                ],
                "summary": "Get ext-tags (tag labels)",
                "description": "Returns a list of tag names used as ext-tags (Ainur categories mapped to product tags in WooCommerce and Shopify). Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "c2951a17052dd90d1e3dae96ba32690b",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of ext-tag label strings (JSON array of strings)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "string",
                                        "example": "Five"
                                    }
                                },
                                "example": [
                                    "Five",
                                    "Group",
                                    "One",
                                    "Set",
                                    "Six",
                                    "Ten",
                                    "Three",
                                    "Two",
                                    "Woo"
                                ]
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/product/updated": {
            "get": {
                "tags": [
                    "Product"
                ],
                "summary": "Gettings updated products",
                "description": "Get product by token. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "a0cf5ae49c004cbcb13973e60525497c",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    },
                    {
                        "name": "start_time",
                        "in": "query",
                        "description": "Start of updated date range (format: Y-m-d H:i:s)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2004-01-10 00:00:00"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of updated products retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "id": {
                                                "description": "Unique product identifier",
                                                "type": "string",
                                                "example": "6993672cb2b05876ed033b78"
                                            },
                                            "published_at": {
                                                "description": "Date and time when the product was published",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2026-02-16 18:51:24"
                                            },
                                            "updated_at": {
                                                "description": "Date and time of the last product update",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2026-02-16 18:55:12"
                                            },
                                            "options": {
                                                "description": "General product information",
                                                "properties": {
                                                    "id": {
                                                        "description": "Product identifier",
                                                        "type": "string",
                                                        "example": "6993672cb2b05876ed033b78"
                                                    },
                                                    "uuid": {
                                                        "description": "Product UUID",
                                                        "type": "string",
                                                        "example": "739844d3-55ef-4f34-ad74-9028d23e0f8f"
                                                    },
                                                    "name": {
                                                        "description": "Product name",
                                                        "type": "string",
                                                        "example": "TEST"
                                                    },
                                                    "description": {
                                                        "description": "Product description (can be null)",
                                                        "type": "string",
                                                        "example": "Description Test",
                                                        "nullable": true
                                                    }
                                                },
                                                "type": "object"
                                            },
                                            "is_variable": {
                                                "description": "Whether the product has variations",
                                                "type": "boolean",
                                                "example": false
                                            },
                                            "variation": {
                                                "description": "Current product variation (null if the product is not variable)",
                                                "properties": {
                                                    "id": {
                                                        "description": "Variation identifier",
                                                        "type": "string",
                                                        "example": "236b3743-8cc0-48a2-878a-8af3f68125c5"
                                                    },
                                                    "name": {
                                                        "description": "Variation name",
                                                        "type": "string",
                                                        "example": "Product #11"
                                                    },
                                                    "property": {
                                                        "description": "Variation attributes (e.g. size, color)",
                                                        "type": "array",
                                                        "items": {
                                                            "properties": {
                                                                "key": {
                                                                    "description": "Attribute name",
                                                                    "type": "string",
                                                                    "example": "Size"
                                                                },
                                                                "value": {
                                                                    "description": "Attribute value",
                                                                    "type": "string",
                                                                    "example": "30"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    }
                                                },
                                                "type": "object",
                                                "nullable": true
                                            },
                                            "sku": {
                                                "description": "Stock Keeping Unit identifier",
                                                "type": "string",
                                                "example": "P-NO11"
                                            },
                                            "barcode": {
                                                "description": "Product barcode",
                                                "type": "string",
                                                "example": "2001725000007"
                                            },
                                            "plu_code": {
                                                "description": "PLU (Price Look-Up) code when present in the catalog (mapped from source field PLU_code). Often used for weighed or scale-labelled items; null if not set.",
                                                "type": "string",
                                                "example": "2100123456789",
                                                "nullable": true
                                            },
                                            "code": {
                                                "description": "Internal product code",
                                                "type": "string",
                                                "example": "01726"
                                            },
                                            "weight": {
                                                "description": "Product weight in kilograms",
                                                "type": "number",
                                                "format": "float",
                                                "example": 1.6
                                            },
                                            "dimensions": {
                                                "description": "Product dimensions in centimeters",
                                                "properties": {
                                                    "length": {
                                                        "description": "Length (cm)",
                                                        "type": "integer",
                                                        "example": 20
                                                    },
                                                    "width": {
                                                        "description": "Width (cm)",
                                                        "type": "integer",
                                                        "example": 20
                                                    },
                                                    "height": {
                                                        "description": "Height (cm)",
                                                        "type": "integer",
                                                        "example": 20
                                                    }
                                                },
                                                "type": "object"
                                            },
                                            "price": {
                                                "description": "Product price",
                                                "type": "number",
                                                "example": 500
                                            },
                                            "discount": {
                                                "description": "Discount amount",
                                                "type": "number",
                                                "example": 0
                                            },
                                            "stock": {
                                                "description": "Stock quantity keyed by store ID (key — store ID, value — quantity). Stores with 0 stock are not included.",
                                                "type": "object",
                                                "additionalProperties": {
                                                    "type": "integer",
                                                    "example": 99
                                                }
                                            },
                                            "in_stock": {
                                                "description": "Whether the product is available in at least one store",
                                                "type": "boolean",
                                                "example": false
                                            },
                                            "tags": {
                                                "description": "Ainur category list (categories[]) mapped to ext-tags and synced as tags in WooCommerce and Shopify",
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "example": "Five"
                                                }
                                            },
                                            "category_id": {
                                                "description": "Ainur group identifier (_parent) mapped to ext-category and synced as category/collection in WooCommerce and Shopify (null if not assigned)",
                                                "type": "string",
                                                "example": "691f0a633bfaae47d60b2129",
                                                "nullable": true
                                            },
                                            "img": {
                                                "description": "List of product image URLs",
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "format": "uri",
                                                    "example": "https://i1.ainur.app/v2/16077fcd-0799-4c31-b8a4-dcd03062aa18.jpg"
                                                }
                                            },
                                            "components": {
                                                "description": "Components included in the product (for bundles/sets)",
                                                "type": "array",
                                                "items": {
                                                    "properties": {
                                                        "id": {
                                                            "description": "Component identifier",
                                                            "type": "string",
                                                            "example": "691f0b1faea43ad2f7083766"
                                                        },
                                                        "exist": {
                                                            "description": "Whether the component exists in the system",
                                                            "type": "boolean",
                                                            "example": true
                                                        },
                                                        "name": {
                                                            "description": "Component name",
                                                            "type": "string",
                                                            "example": "Set #10"
                                                        },
                                                        "price": {
                                                            "description": "Current component price",
                                                            "type": "number",
                                                            "example": 500
                                                        },
                                                        "originPrice": {
                                                            "description": "Original component price without discount",
                                                            "type": "number",
                                                            "example": 500
                                                        },
                                                        "weight": {
                                                            "description": "Component weight in kilograms",
                                                            "type": "number",
                                                            "format": "float",
                                                            "example": 0.5005
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/sales": {
            "post": {
                "tags": [
                    "Sales"
                ],
                "summary": "Create a new sale",
                "description": "Endpoint for creating a new sale. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "createSale",
                "parameters": [
                    {
                        "name": "X-AINUR-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "status",
                                    "store_id",
                                    "date",
                                    "discount_percent",
                                    "discount_sum",
                                    "products"
                                ],
                                "properties": {
                                    "status": {
                                        "description": "Controls posting of the document: true — create and post immediately; false — create as a new (unposted) document.",
                                        "type": "boolean",
                                        "example": false
                                    },
                                    "store_id": {
                                        "description": "Store ID (24-char ObjectId)",
                                        "type": "string",
                                        "example": "686e41e1334591c53507fac9"
                                    },
                                    "customer_id": {
                                        "description": "Customer ID (24-char ObjectId)",
                                        "type": "string",
                                        "example": "6895ebe3bd6637e139053e6a",
                                        "nullable": true
                                    },
                                    "date": {
                                        "description": "Document date and time",
                                        "type": "string",
                                        "format": "date-time",
                                        "example": "2025-09-11 15:30:00"
                                    },
                                    "discount_percent": {
                                        "description": "Overall discount percent",
                                        "type": "number",
                                        "format": "float",
                                        "example": 10
                                    },
                                    "discount_sum": {
                                        "description": "Overall discount amount",
                                        "type": "number",
                                        "format": "float",
                                        "example": 100
                                    },
                                    "products": {
                                        "description": "List of products in the sale",
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "product_id",
                                                "quantity",
                                                "discount_percent",
                                                "unit"
                                            ],
                                            "properties": {
                                                "product_id": {
                                                    "description": "Product ID (24-char ObjectId)",
                                                    "type": "string",
                                                    "example": "686261d6c288a7a7e308bf99"
                                                },
                                                "quantity": {
                                                    "description": "Quantity of the product",
                                                    "type": "number",
                                                    "example": 2
                                                },
                                                "discount_percent": {
                                                    "description": "Discount percent for this product",
                                                    "type": "number",
                                                    "example": 5
                                                },
                                                "barcode": {
                                                    "description": "Product barcode",
                                                    "type": "string",
                                                    "example": "231321",
                                                    "nullable": true
                                                },
                                                "unit": {
                                                    "description": "Measurement unit",
                                                    "type": "string",
                                                    "example": "pcs"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "payment_details": {
                                        "description": "Payment details",
                                        "properties": {
                                            "sum": {
                                                "description": "Payment amount",
                                                "type": "number",
                                                "example": 1337
                                            },
                                            "type": {
                                                "description": "Payment type",
                                                "type": "string",
                                                "enum": [
                                                    "debit",
                                                    "credit"
                                                ],
                                                "example": "debit"
                                            },
                                            "status": {
                                                "description": "Is payed",
                                                "type": "boolean",
                                                "example": "true"
                                            },
                                            "date": {
                                                "description": "Payment date and time",
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2025-09-11 15:35:00"
                                            }
                                        },
                                        "type": "object",
                                        "nullable": true
                                    },
                                    "comment": {
                                        "description": "Comment for the sale",
                                        "type": "string",
                                        "example": "test"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Sale created successfully"
                    },
                    "404": {
                        "description": "Not Found - either the customer or the store does not exist",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "enum": [
                                                "Customer not found",
                                                "Store not found"
                                            ],
                                            "example": "Customer not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/stores": {
            "get": {
                "tags": [
                    "Store"
                ],
                "summary": "Get stores by token",
                "description": "Returns all available stores. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "6152bf71a0d08747f3d894ece26fcea1",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    },
                    {
                        "name": "updated_start",
                        "in": "query",
                        "description": "Start of updated date range (format: Y-m-d H:i:s). Must be before or equal to updated_end.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2004-01-10 00:00:00"
                        }
                    },
                    {
                        "name": "updated_end",
                        "in": "query",
                        "description": "End of updated date range (format: Y-m-d H:i:s). Must be after or equal to updated_start.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2025-08-01 00:00:00"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Limit number of results",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "maximum": 1000,
                            "minimum": 0,
                            "example": 50
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "description": "Offset for pagination",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 0
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of stores retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "shops": {
                                            "description": "List of stores",
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "description": "Unique store identifier",
                                                        "type": "string",
                                                        "example": "686e41e1334591c53507fac9"
                                                    },
                                                    "name": {
                                                        "description": "Store name",
                                                        "type": "string",
                                                        "example": "TEST"
                                                    },
                                                    "address": {
                                                        "description": "Store address",
                                                        "type": "string",
                                                        "example": "123 Main St"
                                                    },
                                                    "uuid": {
                                                        "description": "Store UUID",
                                                        "type": "string",
                                                        "format": "uuid",
                                                        "example": "8539dd37-5b91-43e6-8d03-b2b789154bcd"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "Store"
                ],
                "summary": "Create a new store",
                "description": "Creates a new store by token. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "6d180f17e727646c7fff6df18971688b",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    }
                ],
                "requestBody": {
                    "description": "Store creation payload",
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "description": "Store name",
                                        "type": "string",
                                        "example": "Main Store"
                                    },
                                    "address": {
                                        "description": "Store address",
                                        "type": "string",
                                        "example": "123 Main St"
                                    },
                                    "description": {
                                        "description": "Optional description",
                                        "type": "string",
                                        "example": "Flagship store in Moscow"
                                    },
                                    "default": {
                                        "description": "Whether this is the default store",
                                        "type": "boolean",
                                        "example": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Store created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "description": "Unique store identifier",
                                            "type": "string",
                                            "example": "686e41e1334591c53507fac9"
                                        },
                                        "name": {
                                            "description": "Store name",
                                            "type": "string",
                                            "example": "TEST"
                                        },
                                        "address": {
                                            "description": "Store address",
                                            "type": "string",
                                            "example": "123 Main St"
                                        },
                                        "uuid": {
                                            "description": "Store UUID",
                                            "type": "string",
                                            "format": "uuid",
                                            "example": "8539dd37-5b91-43e6-8d03-b2b789154bcd"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/stores/{store}": {
            "get": {
                "tags": [
                    "Store"
                ],
                "summary": "Get stores by token",
                "description": "Returns all available stores. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "2b6c6b344401b74ee6ca702195d6e661",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    },
                    {
                        "name": "store",
                        "in": "path",
                        "description": "Store ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Store retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "description": "Unique store identifier",
                                            "type": "string",
                                            "example": "686e41e1334591c53507fac9"
                                        },
                                        "name": {
                                            "description": "Store name",
                                            "type": "string",
                                            "example": "TEST"
                                        },
                                        "address": {
                                            "description": "Store address",
                                            "type": "string",
                                            "example": "123 Main St"
                                        },
                                        "uuid": {
                                            "description": "Store UUID",
                                            "type": "string",
                                            "format": "uuid",
                                            "example": "8539dd37-5b91-43e6-8d03-b2b789154bcd"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized access.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized access."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Store not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Store not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "tags": [
                    "Store"
                ],
                "summary": "Update store",
                "description": "Update store by token. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "c14bbc2a35e084f932f4446185bf1af8",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    },
                    {
                        "name": "store",
                        "in": "path",
                        "description": "Store ID to delete",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Store creation payload",
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "description": "Store name",
                                        "type": "string",
                                        "example": "Main Store"
                                    },
                                    "address": {
                                        "description": "Store address",
                                        "type": "string",
                                        "example": "123 Main St"
                                    },
                                    "description": {
                                        "description": "Optional description",
                                        "type": "string",
                                        "example": "Flagship store in Moscow"
                                    },
                                    "default": {
                                        "description": "Whether this is the default store",
                                        "type": "boolean",
                                        "example": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Store updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "description": "Unique store identifier",
                                            "type": "string",
                                            "example": "686e41e1334591c53507fac9"
                                        },
                                        "name": {
                                            "description": "Store name",
                                            "type": "string",
                                            "example": "TEST"
                                        },
                                        "address": {
                                            "description": "Store address",
                                            "type": "string",
                                            "example": "123 Main St"
                                        },
                                        "uuid": {
                                            "description": "Store UUID",
                                            "type": "string",
                                            "format": "uuid",
                                            "example": "8539dd37-5b91-43e6-8d03-b2b789154bcd"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Store not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Store not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Store"
                ],
                "summary": "Delete a store by its ID",
                "description": "Delete store by token. Required fields are marked with an asterisk (*) in the documented schema.",
                "operationId": "85bb47a082d9378e5d20b99470ffac0f",
                "parameters": [
                    {
                        "name": "X-CloudShop-API-Access-Token",
                        "in": "header",
                        "description": "Access token for API authentication",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                        }
                    },
                    {
                        "name": "store",
                        "in": "path",
                        "description": "Store ID to delete",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Store successfully deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "description": "Whether the deletion was successful",
                                            "type": "boolean",
                                            "example": true
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Store not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Store not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "API key does not have permission for this route."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "tags": [
        {
            "name": "Company",
            "description": "Company"
        },
        {
            "name": "Customer",
            "description": "Customer"
        },
        {
            "name": "Document",
            "description": "Document"
        },
        {
            "name": "Product",
            "description": "Product"
        },
        {
            "name": "Sales",
            "description": "Sales"
        },
        {
            "name": "Store",
            "description": "Store"
        }
    ]
}